Post Navigation

The post navigation is an important part in order for Auto Load Next Post to work. Most themes should have one on a single post preferrably at the end of the article.

If the theme does not have a post navigation on a single post at the end of the article then you will need to add a post navigation to the single post. Follow the Next and Previous Links guide and your theme will be one step closer to being ready for Auto Load Next Post.

If your theme does have a post navigation and you have everything setup but Auto Load Next Post is still unable to load a post then it may be because the post navigation is missing an attribute assigned to the previous post link.

Auto Load Next Post looks for two possible types of rel attributes applied to the previous post link.

By default and most professionaly made WordPress themes should have rel="prev" applied to the previous post link. However, should it not be available it will lookup any link that has rel="previous" instead.

Should either of those two attibutes not be applied to the previous post link in the post navigation then you will need to apply it in order for Auto Load Next Post to regonize the link of the previous post.

One way to apply the missing attribute is via JavaScript one when the document is ready and again for each post loaded.

I’m seeing two post navigations.

This can depend on theme your using but if you are developing a theme yourself then it would be because of where you placed the post navigation for a single post. Auto Load Next Post also places a compatible post navigation for you and would look just like a link.

To remove it, all you have to do is use the following snippet by adding it to your functions.php file.

remove_action( 'alnp_load_after_content', 'auto_load_next_post_navigation', 1, 10 );

Only one post loads after the initial post, why?

This is because your post navigation selector does not match. You may have set the post navigation selector for your theme correctly but the template is not loading the themes post navigation and instead is using the compatible post navigation.

You will need to make sure the post navigation matches from your theme so Auto Load Next Post recognizes it.

First, you will need to remove the compatible post navigation as shown above and then hook in your themes post navigation in place like so:

add_action( 'alnp_load_after_content', 'your_theme_post_navigation', 1, 10 );
function your_theme_post_navigation() {
// Place your themes post navigation here.