I’m having the following problem:

I want to move the generated page numbers from <!--nextpage--> to appear below the post body, above the plugins (WordPress Related Posts, WP Author Box Lite & JetPack Share).

Looking at single.php, wp_link_pages() comes right after the_content(). Are these plug-ins adding their content to the_content()? The documentation seems to give some alternative usage. Is this the only solution or is there a plug-in that will help with this problem?

I’m using the BoldR Lite theme.

1 Answer
1

You can filter the content earlier than these plugins and add the navigation there.

Remove wp_link_pages() from the template, and add the following code to the theme:

add_filter( 'the_content', function( $content ) {
    return $content . wp_link_pages( array( 'echo' => FALSE ) );
}, -1 ); // Lower number = higher priority.

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *