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.
// functions.php
add_filter('alm_seo_leading_slash', '__return_true');
PHPNote: 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
//functions.php
add_filter('alm_seo_remove_trailing_slash', '__return_true');
PHPalm_seo_posts_per_page
Disable the posts_per_page protection for this add-on.
//functions.php
add_filter('alm_seo_posts_per_page', '__return_false');
PHPOffset 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.
//page.php
echo do_shortcode( '[ajax_load_more seo="true" seo_offset="true"]' );
PHPNote: This parameter is helpful for listing that have a custom query above Ajax Load More on the page.