Genesis: Reposition Pagination For WP Link Pages Next Page Tag

By default, Genesis displays the page links after the content when using the next page tag in the WordPress editor.

Here’s what the page links look like on a single post:

Before

default page links position

And here’s the nextpage tag added in the editor in the Edit Post screen:

next page tag

And here’s what the PHP code in this post enables you to do:

After

links before content

And here’s the code you simply copy from the view raw link and paste at the end of your child themes functions.php file using a code editor.


Comments

2 responses to “Genesis: Reposition Pagination For WP Link Pages Next Page Tag”

  1. Thanks, Brad. I did this on my site and it works a treat! Now I’d like to relocate this output down to the end of the first section of the multi-page post to make it more obvious for my readers. Can I leverage hook priority to ensure that the output of “next page” precedes output from any other plugin, or is just simpler to order the plugins’ output directly in the template (via each plugin’s own tag)?

    Thanks again!
    -DonO

    1. Brad Dalton Avatar
      Brad Dalton

      You could try the genesis_entry_footer hook with a priority of 1 but i don’t think it will hook in before any plugin which uses the_content filter so you may need to re-position the plugins output which is fairly easy if it includes a template tag.

      If the plugin generates a tag, you could add it in a template or use any genesis hook, even the genesis_entry_footer hook with a lower priority.

Leave a Reply

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.