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.