Skip to content

snippet

javascript fetch api

JavaScript fetch API to load WordPress posts

There are many ways to paginate your WordPress archives. paginate_links() function is one of them. It will return the pagination number links for your archives. However this pagination will show posts in separate pages like 1, 2, 3 etc. But there is a way to load more posts in your archive without refreshing the entire page. We shall learn the most effective way to do that with simple JavaScript fetch API. This tutorial covers the entire process of using the fetch API and without any jQuery dependency.

Read More »JavaScript fetch API to load WordPress posts