The Next Page add-on provides functionality for infinite scrolling multi-page WordPress posts and pages.

Load and display paginated WordPress content on demand using the Page Break block for Gutenberg or the <!–-nextpage–-> quicktag and Ajax Load More.

Features

A few key features of the Next Page add-on for Ajax Load More.

Increase Revenue

Grow your revenue by increasing your pageviews and ad impressions with paged content.

URL Rewrites

As visitors scroll your page, the browser address bar is updated to the URL of the page currently in view.

Paging Integration

Combine both the Paging and Next Page add-ons to transform your multi-page posts into slideshows.

View Example

Google Analytics

Track visitor interaction and engagement by sending pageviews to your Google Analytics account.

Add-on Details

Learn more about the Next Page add-on.

How It Works

The Next Page add-on uses the Page Break block for the WordPress Block Editor (Gutenberg) or the <!-‒nextpage‒-> Quicktag in the Classic Editor to split the post_content of the current post into multiple pages.

Example contant editor

The Next Page add-on dynamically splits the_content() of a page, post or custom post type into unique pages at the location where Page Break blocks or <!-‒nextpage‒-> tags are found and then Ajax Load More provides functionality to infinite scroll the results.

Note: The <!-‒nextpage‒-> tag and Page Break blocks are core WordPress functionality to break content into pages.

As users load additional pages of content, the browser address bar is updated to the page currently in view and pageviews are sent to Google Analytics for tracking – both these options can be turned on or off depending on your requirements.

With the Next Page add-on you can infinite scroll any piece of post content your WordPress site offers.


Examples


Implementation

Implementing the Next Page add-on is a two-step process of creating the multi-page content and configuring an Ajax Load More shortcode to display the results.

Note: Next Page add-on integrates with the standard WordPress content editor only. Content created via custom fields or rich text widgets cannot be used with this add-on.

Step 1 – Create Multi-Page Content

The first step is to create a page or post with some paginated content – if you’ve already done this, skip ahead to Step #2.

The Gutenberg (Block editor) and the Classic Editor are both supported by the add-on, however the implementation steps vary for each editor so please read below for instructions on how to create multi-page content.

Gutenberg Editor

Gutenberg users must insert a Page Break block at the locations they wish a break to appear in the content.

Simply insert the Page Block and for every instance found Ajax Load More will split the content into pages and load the content via infinite scroll.

Gutenberg Page Break Block

Classic Editor

Classic Editor users must switch the content editor to the Text tab and place <!-‒nextpage‒-> tags where the page breaks should appear in the content.

For every <!-‒nextpage‒-> instance found Ajax Load More will split the content into pages and load the content via infinite scroll.

Next Page Text Editor Screenshot

Note: The <!-‒nextpage‒-> tag must be added to the content editor via the Text tab (as seen above) and will display as a page break in the Visual editor.

Step 2 – Adding the Shortcode

The last step is to add or configure your custom Ajax Load More shortcode, the Next Page add-on provides two unique methods for doing so.

The Post Type implementation allows for Next Page functionality to be enabled automatically on specific post types, while the Template implementation allows for more granular control of where and when the functionality is enabled.

Post Type Implementation (Automatic)

The Next Page add-on (v1.6.0+) provides a Post Type installation method where all plugin configuration and setup is handled via global Ajax Load More settings.

This method allows users to automatically enable Next Page functionality on a per Post Type basis and requires absolutely zero template modification or custom configuration outside of the plugin settings page. Ajax Load More will automatically inject Next Page functionality into the single template for selected Post Types.

Next Page settings and configuration screen.

Access the plugin configuration settings by visiting Ajax Load More > Settings > Next Page in your WordPress admin.

Once on the setting screen, follow the steps below:

  1. Select the post type(s) to activate Next Page functionality.
  2. Enter the custom Ajax Load More shortcode for each template.
    Note: As a fallback, should you not enter a shortcode, Ajax Load More will set a basic [ajax_load_more nextpage="true"] shortcode.

When a Post Type is selected, Next Page functionality is injected automatically into the single template for the Post Type and no further set up is required..

Template Implementation (PHP)

For users who want to control exactly where the Next Page functionality is enabled, the add-on can be implemented via backend code using WordPress templates. With this implementation method, the Ajax Load More shortcode is required to be added directly to a PHP template using the core WordPress function, do_shortcode.

The Ajax Load More shortcode should replace the_content() of the page only as no other content or elements will be affected by the Next Page add-on.

In the code sample above, the_content() function used to render the page content has been replaced with an Ajax Load More shortcode.


Shortcode Parameters

The following shortcode parameters are available with the Next Page add-on.

nextpage Enable the infinite scrolling of multi-page WordPress content (true/false). Default = ‘false’
next_post_id The ID of the current page/post. *required
nextpage_urls Update the browser address bar as pages come into view. (true/false). Default = ‘true’
nextpage_pageviews Send pageviews to Google Analytics. (true/false). Default = ‘true’
nextpage_scroll Scroll users automatically to the next page. (true/false:scrolltop). Default = ‘true:30’
nextpage_title_template The title template is used to update the browser title each time a new page is loaded.

Shortcode Builder

The following screenshot illustrates the process of building a Next Page shortcode using the Shortcode Builder.

Nextpage Shortcode Builder Options

Example Shortcode

[ajax_load_more nextpage="true" nextpage_urls="true" nextpage_scroll="true:50" nextpage_post_id="'.get_the_id().'" pause="true" pause_override="true" scroll="false"]

Note: If using the Template Implementation the Next Page shortcodes must be added using the do_shortcode method of shortcode implementation.


Installation

Upon purchase of this add-on you will receive a confirmation/purchase receipt email. Your receipt will contain a direct link for downloading your copy of Ajax Load More: Next Page and a license key.

After downloading the add-on, upload the unzipped files to your /wp-content/plugins/ directory or visit your plugins dashboard and upload the downloaded .zip under Add New.

License Activation

To activate your add-on and receive updates directly in your WordPress plugins dashboard users are required to enter the license key that was included with their purchase receipt.

To activate a license key:

  1. Visit the Licenses section within the Ajax Load More plugin.
  2. Enter the product key and click Activate License.
  3. If the status indicator turns green your add-on has been successfully activated (example below).
License Key Example

If you did not receive your confirmation/purchase receipt email and license key, please check your spam/junk folder and if you still cannot locate the email please contact me at darren [at] connekthq.com or use the Product Support form on the website.