Filter Hooks

The following Ajax Load More filters are available to support the modification of query arguments and plugin output.


This filter is used to add content or HTML after the Ajax Load More container.


This filter is used to add content before the load more .alm-button-wrap button container.


This filter is used to add content or HTML before the Ajax Load More container.


This filter is used to modify the default ‘Older Posts’ text on the Ajax Load More button.


This filter is used to display the Ajax Load More WP_Query arguments in the browser console. Debug data will be returned in a unique entry labeled alm_debug in the browser console.


The alm_query_args_{id}() filter can be used to modify WP_Query arguments by a specific Ajax Load More instance ID.

The following snippet would be pasted in your theme’s functions.php file.

This filter requires the following 2 step process:

  1. Set Unique ID – Ceate a unique ID for your ALM instance by setting a value for the id parameter in the shortcode.
    [ajax_load_more id="your_id"]
  2. Add Filter – Create the custom filter and function for this instance by appending the unique ID to the filter name.
    add_filter(‘alm_query_args_your_id’, ‘my_function_name’);

When is this filter useful?

This filter is useful for advanced users who prefer to write custom queries over working with shortcode parameters.

Note: Never modify the offset or paged query parameters – these parameters must be set within the core plugin or results may be undesired.

Parsing Query Strings

You can dynamically build a custom query by parsing a query string URL directly inside the alm_query_args filter.

The following snippet retrieves a category value from a query string and adds the category parameter to the $args array.


This filter is used to override the global settings for Ajax Load More.


This filter is used to set global defaults for Ajax Load More parameters. These can be overwritten in the shortcode or the alm_render method.


This filter is used to adjust the global transition speeds of Ajax Load More.