You know why you are addicted to Facebook newsfeed, don’t you? It keeps on getting you new posts as you scroll down. You don’t have to click any button.
They use a feature called Ajax Infinite Scroll. As long as you scroll the mouse wheel down, it shows results. Many researches showed that websites with infinite scroll get comparatively higher page views and lower bounce rate.
In this article, you will know how to add infinite scroll facility on your WordPress website.
How to Add Infinite Scroll on WordPress?
I will walk you through the entire steps needed to implement Ajax Infinite Scroll on your site. But before you do, I want you to know that you can’t display footer on your site once you activate the feature
So, are you ready to get into the core of this post? Here you go!
Step 1: First, you have to install a plugin called Ajax Load More. Just log into your site in order to do the same.
Step 2: Once you log in, navigate to Plugins>> Add New. Can’t you see a search field there? Simply enter Ajax Load More into it.
Step 3: Install and activate the plugin. There you go! You now have Ajax Load More on your site.
Step 4: Have a look at the left sidebar. You can see a new menu called Ajax Load More there, can’t you? Simply, click on the same.
Step 5: What you get is the global settings of the plugin. There are not many options for you to change. Still, you can alter two features there without affecting the core function of the plugin. (If you are familiar with CSS, you can add your own styles).
Button/ Loading Style:- The loading icon or button. You get more than a dozen of them to choose from.
Editor Button:- If you want to hide the shortcode button on the post editor, you can enable this option.
Step 6: Go to Repeater Templates from the left panel. You can see a PHP code snippet there. If you know PHP, you can alter it. The free version of the plugin doesn’t allow the use of more than one repeater template. Nonetheless, you can purchase Custom Repeaters Add-on to setup different template for various post types.
Step 7: You can generate shortcodes and use it on any page to enable Ajax Infinite Scrolling. Let’s know how it can be done.
First, you have to click on Shortcode Builder under Ajax Load More. There you will get a lot of settings to play with.
ID:- You can type anything or just click on generate unique ID link. Doing this will help you target this instance anytime you want.
Label:- The text you enter here will be the label on the load more button.
Images Loaded:- If you enable this, Ajax loaded content will not be displayed until all the images get shown.
Pause:- If you don’t want to load Ajax content without a click from the user, you can enable this feature.
Enable Scrolling:- As you disable this, no more posts get loaded.
Scroll Distance:- The lesser the distance, the quicker it will display Ajax content.
Maximum Pages:- The number of pages to be displayed via Ajax Infinite Scrolling. You can enter 0 for unlimited.
Posts Per Page:- The number of posts to be shown with each loading session.
Post Type:- The type of content to load with this effect.
Category:- With include feature, you can enable Ajax on specific categories and with exclude you can avoid the same.
Author:- Select an author to enable Ajax on the archives of his/her posts only.
Step 8: Once you select all the necessary settings, you can copy the shortcode from the right-bottom part of the screen and paste the same wherever you want.
Some Additional Settings
I have already told you about an add-on called Custom Repeaters. Here are some others.
Cache:- Improves the speed of your site by caching the Ajax content.
Call to Actions:- You can display advertisements or customized buttons in between the content with this add-on.
Comments:- Enables infinite scroll on blog comments.
Layouts:- Offers readymade layouts.
Search Engine Optimization:- Optimizes the URL and creates unique URLs for Ajax queried pages.
Available premium addons list contains
- Call to Actions
- Custom Repeaters
- Previous Post
- REST API
- Search Engine Optimization
- Theme Repeaters
- The Complete Bundle
Other info from repository
- Star rating : 5 Star rated on an average
- Update : Yes updated when required
I have finished my part. It is up to you now. The plugin is free to install. So, you don’t have to lose anything.
Once you like the plugin, you can purchase premium add-ons to enhance its features.