WordPress.org

Support

Support » Plugins and Hacks » Related posts plugins and the <!–nextpage–> tag

Related posts plugins and the <!–nextpage–> tag

  • MikePaulus
    Member

    @mikepaulus

    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!

Viewing 1 replies (of 1 total)
  • binfalse
    Member

    @binfalse

    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 😉

Viewing 1 replies (of 1 total)
  • The topic ‘Related posts plugins and the <!–nextpage–> tag’ is closed to new replies.