WordPress.org

Ready to get started?Download WordPress

Forums

Related posts plugins and the <!--nextpage--> tag (2 posts)

  1. MikePaulus
    Member
    Posted 4 years ago #

    Hi!

    I've used a few different Related posts plugins and they always dsplay results ABOVE the page numbers generated by the <!--nextpage--> tag

    Can I get the page numbers to appear above the related posts? How?

    Any help would be MUCH appreciated!

  2. binfalse
    Member
    Posted 3 years ago #

    the problem is, that your plugin calls itself to modify the post content. it just extends the post with its own content. your theme prints the modified content and after wards places the pagination beyond it.

    to change it find the line in your plugin code that looks like this
    add_filter('the_content', 'ANY_FUNCTION');
    and comment it out (place two slashes in front of it):
    //add_filter('the_content', 'ANY_FUNCTION');

    now go to your theme and find the line that calls the pagination, it may look like this:
    wp_link_pages( ... );
    here you can call your plugin function:
    wp_link_pages( ... ); if (function_exists ("ANY_FUNCTION")) echo ANY_FUNCTION("");

    that does the trick, now your related posts are beyond the pagination ;)

Topic Closed

This topic has been closed to new replies.

About this Topic