Is there anything more addictive than the Facebook News Feed. I mean, I'm sitting here trying to write this post, but that addictive little bugger just keeps scrolling…and scrolling…and scrolling. Now, it's 30 minutes later and I still haven't started.
That's (partially) because Facebook uses something called infinite scroll, AKA endless scroll, for the News Feed. Rather than having to click a "Read more" or "Next" button, the content just keeps loading as you scroll down the page.
And guess what? You can get that same effect for your WordPress blog by adding infinite scroll.
In this post, I'll discuss some of the pros and cons of infinite scroll and then I'll show you how to set up infinite scroll for WordPress using a plugin called Ajax Load More.
Benefits of WordPress Infinite ScrollPlenty of big brands have experimented with infinite scroll, which gives us the benefit of being able to look at their data. Here are some of the benefits sites experienced when adding infinite scroll:
I can't say for certain you'll get the same results as the big brands, but if you have lots of blog posts of equal importance, infinite scroll is definitely a good option.
Most social networks rely on infinite scroll for this reason – the tweets and posts on them are all of equal weight.
Additionally, some major news organizations, most recently Slate, have latched onto the infinite scroll trend.
Negatives of WordPress Infinite ScrollIt's not all roses with infinite scroll. There are definitely some potential negatives you want to consider:
Additionally, in the "Benefits" section I said infinite scroll is good when you have many blog posts of equal importance. Well, the opposite is true as well:
If your blog posts are of unequal importance (e.g. some are massive 2,000 word guides and some are 300 word quick posts), then infinite scroll probably isn't a good idea for your site.
How to Add Infinite Scroll to WordPressTo add infinite scroll to WordPress, you can use a free plugin called Ajax Load More. The plugin includes tons of premium add-ons that can boost its functionality, but the free version should be enough to add simple infinite scroll to your site.
The basic plugin works by generating a shortcode that you add to a page. This page will then display your blog posts in an infinite scroll. There are some other small steps you'll also need to complete along the way. Here's how to get everything set up:
Install Ajax Load More and Set Your Repeater TemplateYou can find Ajax Load More on the wordpress.org repository. Install and activate it like you would any other plugin.
Once it's activated, you'll see a brand new Ajax Load More option. Go to Ajax Load More → Repeater Template to build your repeater template.
Your repeater template is the template for how posts should look when they infinite scroll. Editing it requires knowing some PHP. BUT, the default template should be fine for most users:
The only important thing to note is that the default repeater template will only show post excerpts, not full posts. If you want to display full posts, you need to replace the_excerpt() with the_content().
If you know your way around PHP, you can further change this template. Otherwise, it's totally fine to leave the default repeater template.
Build Your Shortcode to Display Infinite Scroll PostsNext, you need to build the shortcode you'll use to display your infinite scroll. Go to Ajax Load More → Shortcode Builder:
There is a lot you can configure here. You're basically going to build out exactly what content to include in your infinite scroll and how it should function. I can't go over every single item, but here are some of the boxes you'll definitely want to fill out:
You should give everything a look over. But at the very minimum, make sure you configure the above.
Once you've configured everything, copy the shortcode on the right side of the page:
All you need to do is add this shortcode to the page where you want your infinite scroll to appear. For example, you could add it to a page called Blog to make it your default blog page:
When you publish that page, you should see your brand new WordPress infinite scroll!
Wrapping Things UpInfinite scroll is not right for every single WordPress site. But if your site publishes content of equal importance, you may be able to improve your bounce rate and pages per visit if you implement infinite scroll. At the very least, it's worth testing.
Of the plugins out there, Ajax Load More is probably the simplest way to add infinite scrolling to WordPress. You don't need any of the premium add-ons if you're just using it for basic infinite scrolling. Installation is also easy and it shouldn't take much more than 15-30 minutes to get your WordPress site up and running with infinite scroll.
Has anyone successfully or unsuccessfully implemented infinite scroll on their WordPress site? I'd love to hear some personal experiences in the comments!
Does WPLift load fast for you? That's because we use Siteground for hosting, WPLift readers can click here to get up to 60% off hosting for your site.
Source: Add Infinite Scroll to WordPress via a Plugin called Ajax Load More
No comments:
Post a Comment