Results Text

Ajax Load More offers a simple method to provide feedback to users about the current page, post count and the total number of pages available in a load more query.

By adding the following HTML snippet to any page that Ajax Load More is active, the end user will be presented with text on screen informing them of their progress through the load more process.

Note: Results Text can only be used when a single instance of Ajax Load More is present and is not yet compatible with the Comments or Cache add-on.


Adding the HTML

The HTML snippet can be added to your page anywhere you like. If Ajax Load More is able to locate the element, it will render the results text.

🔥 Pro Tip: Use the alm_before_button filter hook to inject the text directly into the Ajax Load More listing.


Display Variables

The following variables can be used to customize the results text for users. These variables can be accessed using the alm_display_results filter hook.

{post_count} The total number of posts loaded.
{total_posts} The overall total number of posts.
{page} The current page number.
{pages} The total number of pages.

Filter Hooks

The copy displayed to the user in the results text can be updated by using the following filters.

alm_display_results

The alm_display_results filter will updated the feedback text for the user.

alm_no_results_text

The alm_no_results_text filter will change the feedback text when zero posts are returned in the query.