Skip to content

WordPress

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
WordPress Rest API and Ajax

WordPress custom posts archive with REST API and ajax

WordPress archives are template based which uses the default loop. For example – archive.php, archive-{post-type}.php, category.php, tag.php etc are used for different types of archives. Beside this, the index.php file should always be used for the home page which shows most recent posts in chronological order. We all are very… Read More »WordPress custom posts archive with REST API and ajax

Pages: 1 2 3 4