NextPage location – simple hooks

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

This topic is: not resolved

Tagged: 

This topic contains 8 replies, has 2 voices, and was last updated by  moneyfunk 1 year, 4 months ago.

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

    moneyfunk
    Participant
    Post count: 24

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

    http://www.oatmealinmybowl.com/the-kitchen/hamburger-rice-soup/

    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.


    #35698

    braddalton
    Participant
    Post count: 10675

    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. http://codex.wordpress.org/Styling_Page-Links

    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. http://wordpress.org/extend/plugins/genesis-single-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.


    #35700

    braddalton
    Participant
    Post count: 10675

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


    #35702

    moneyfunk
    Participant
    Post count: 24

    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.

     

    http://www.oatmealinmybowl.com/the-kitchen/hamburger-rice-soup/


    #35708

    braddalton
    Participant
    Post count: 10675

    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.


    #54398

    moneyfunk
    Participant
    Post count: 24

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


    #54402

    moneyfunk
    Participant
    Post count: 24

    Nev mind. figured it out! :D Yay!


    #54403

    braddalton
    Participant
    Post count: 10675

    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.


    #54405

    moneyfunk
    Participant
    Post count: 24

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

    <?php if (is_single()) {?>
    [nrelate-related]
    <?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.