REQUIRED: The theme doesn't have post pagination code in it. Use posts_nav_link()....

Hello
Although i have used next_post_link('%link')' andprevious_post_link(’%link’)` in my single.php but still theme check is displaying error:

REQUIRED: The theme doesn’t have post pagination code in it. Use posts_nav_link() or paginate_links() or the_posts_pagination() or the_posts_navigation() or next_posts_link() and previous_posts_link() to add post pagination.

complete snipt is this:

                                   <div class="row">
                                                <div class="col-md-6 text-center">
                                                    <div class="inter-post-nav">     <?php next_post_link('%link'); ?> </div>
                                                </div>
                                                <div class="col-md-6 text-center">
                                                     <div class="inter-post-nav">    <?php previous_post_link('%link'); ?>                                                   </div>
                                                  </div>
                                            </div>

i can not figure it out why is theme check raising the warning? can anybody help in this regard?
thanks.

You need pagination for blog page that displays all posts, right now you have only next/previous links from single post page.

Notice that next_post_link and next_posts_link are different functions.

Cheers!

1 Like