NextPage location – simple hooks

Community Forums Forums Design Tips and Tricks NextPage location – simple hooks

This topic is: not resolved


This topic contains 8 replies, has 2 voices, and was last updated by  moneyfunk 2 years, 3 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
  • #35690


    Using the <!–nextpage–> tag in my post adds the pagination after the content, but also after my add-post-footer & nrelate plugin.

    How would I use simple hooks to move the posts pagination function reference:

    wp_link_pages($args = ”)

    above the plugin content and show right after the posts?

    Thank you.



    There is no single post navigation in your theme by default.

    The next page tag is used to break up larger posts and not for single post navigation.

    The hook location for single post navigation is named the genesis_after_post_content hook as you can see in this visual hook reference.

    You might find this code useful:

    Otherwise David Decker has a plugin which is a bit different but excellent for post navigation.

    You’ll also find there’s an after widget already included hooked into the genesis_after_post_content hook so you’ll need to use another hook and add a third parameter to the code which is lower then the default of 10. I have added that to the code above.



    The above code goes at the end of your child themes functions.php file and not in the simple hooks plugin.



    Brad – thank you very much for your help. And I will definitely use this reference when I have the time to add more to my blog.

    But I may be wording it wrong – I am trying to break up a long post into multiple pages by using the  <!–nextpage–> tag. If you look after the nRelate content you will see it says, “Pages: 1, 2″. I am looking to move that above the nRelate footer and the Add-Post-Footer content.




    Yes i see now. Its not really a long post though so maybe you don’t need it.

    You might have to change the hook for nrelate so it loads after the next page links.



    Brad – do you know how I would change the hook for nrelate? And thank you for your help. :)



    Nev mind. figured it out! :D Yay!



    There’s 4 ways to do that:

    1. Use the nRelate template tag in a custom function with Genesis hook.
    2. Use the nRelate shortcode in a custom function with Genesis hook.
    3. Use the nRelate widget in a custom widget.
    4. Use the nRelate shortcode in a custom widget and add support for shortcodes in widgets.



    Ah! you’re quick. i ended up using the shortcode and hooking it at the genesis_after_post_content Hook

    <?php if (is_single()) {?>
    <?php } ?>

    then went into the nrelate settings and had to uncheck both

    • Top of post (Automatic)
    • Bottom of post (Automatic)

    and it worked. :D

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.