Skip to main content
2 of 5
added 10 characters in body
birgire
  • 67.8k
  • 7
  • 119
  • 251

You can try to use the the_post filter, to override the content pagination, that takes place within the setup_postdata() function ( PHP 5.4+ ):

/**
 * Ignore the <!--nextpage--> for content pagination.
 * 
 * @see http://wordpress.stackexchange.com/a/183587/26350
 */

add_action( 'the_post', function( $post )
{
    if ( false !== strpos( $post->post_content, '<!--nextpage-->' ) ) 
    {
        // Reset the global $pages:
        $GLOBALS['pages'] = [ $post->post_content ];
        // Let's empty the link pagination:
        add_filter( 'wp_link_pages', 'wpse_empty_link_pages', 10, 2 );
    }
    
}, 99 );

function wpse_empty_link_pages( $output, $args )
{
    remove_filter( current_filter(), __FUNCTION__ );
    return '';
}

to ignore the <!--nextpage--> feature.

birgire
  • 67.8k
  • 7
  • 119
  • 251