How to Load Older Articles Dynamically Using AJAX in WordPress


Usually, most of the blogging themes come with pagination to view older posts, in this article we have described on how to load older posts dynamically using AJAX. By using AJAX load more button you can load the older articles on the same page instead of new pages which avoids page reload.

Also read:

How to Load Older Articles Dynamically using AJAX

let’s know how to implement AJAX load more button in WordPress to load older articles without any serious coding. All we need is a tiny WordPress plugin called “Easy Load More”.

Easy Load More plugin let you add AJAX load more button to your blog, when you click on “Load more” button a set of older articles will be loaded on your blog page. Here is the step by step guide to use Easy Load More WordPress plugin-

  1. Login to your WordPress admin area and go to “Plugins >> Add New”
  2. Search for Easy Load More plugin developed by Idiom Interactive, install the plugin and activate it
  3. Once the plugin is activated, go to ‘Settings > Easy Load More’ to setup the plugin
  4. Now enter your post list wrapper class name or ID in Post List Wrap Selector input box, post list wrapper class is nothing but the div’s class that holds your post loop, check out the image below to clarify-
  5. Enter the button text such as “Load More Articles”, select the loading animation, button color as well as text color
  6. Finally, we have to add a function in our theme file to make it work. Navigate to “Appearance >> Editor” and click on Main index template (index.php). Please make sure to backup your index.php file before modifying it so that you can revert it if something goes wrong.
  7. Add the function <?php load_more_button(); ?> after the post list wrapper (after “post-wrapper” div as shown in the above image)

That’s it, you have just added the AJAX load more button to load older articles in your blog.



Article by Shrinivas Naik

Hi, This is Shrinivas I am a web developer and WordPress enthusiast. I am also a hobby blogger who loves to write about WordPress, web tools, blogging and technology.


2 comments on “How to Load Older Articles Dynamically Using AJAX in WordPress

Leave a Reply