DocumentationOnline documentation for Ajax Load More
Search Engine Optimization
Developer documentation for the Ajax Load More SEO add-on.
Filter Hooks
The following filter hooks are available when using this add-on:
alm_seo_leading_slash
Add a leading slash / before the page number in the URL.
1 2 |
// functions.php add_filter('alm_seo_leading_slash', '__return_true'); |
Note: This is useful when permalink URLÂ structures do not have trailing slashes.
alm_seo_remove_trailing_slash
Removes the trailing slash / from the end of the paged URL. e.g. website.com/page/2
1 2 |
//functions.php add_filter('alm_seo_remove_trailing_slash', '__return_true'); |
alm_seo_posts_per_page
Disable the posts_per_page protection for this add-on.
1 2 |
//functions.php add_filter('alm_seo_posts_per_page', '__return_false'); |
Offset Loading
There may be situations where you want to use the Ajax Load More SEO functionality but you are also loading the first page of content using a custom query on the server side.
In this use-case, ALM users can set seo_offset=”true” in their shortcode and the SEO pagination will begin at the second page of content.
1 2 |
//page.php echo do_shortcode( '[ajax_load_more seo="true" seo_offset="true"]' ); |