Ajax Load More makes it easy to fetch and display archive content on WordPress archive pages by simply adding archive=”true” to the core Ajax Load More shortcode.
Example Shortcode[ajax_load_more archive="true" post_type="post" posts_per_page="8"]
With archive set in a shortcode, Ajax Load More will automatically detect the current archive type and build the perfect query on the server side based on the type.
The following archive types are currently supported with the archives integration.
The following code sample is a complete archive.php template that generates the page title for each archive type followed by the Ajax Load More shortcode.
You can separate archives into unique templates (category.php, tag.php etc) if you wish – the archive integration works in all supported archive templates.
Note: When using the archive integration, do not set additional query shortcode parameters other than posts_per_page and/or post_type – Ajax Load More automatically creates the query for you based on the current archive page and other parameters may cause unexpected consequences.