It’s possible to modify the content pagination with the content_pagination
filter.
Here’s a way to always display the content of the first page:
/**
* Content Pagination: Always display the content of the first page
*/
add_filter( 'content_pagination', function( $pages )
{
// Nothing to do if there's no pagination
if( count( $pages ) <= 1 )
return $pages;
// Get the first page and remove it from the pages array
$firstpage = array_shift( $pages );
// Prepend the first page to all other pages
foreach( $pages as &$page )
$page = $firstpage . $page;
// Add the first page again
array_unshift( $pages, $firstpage );
return $pages;
} );
Example:
Let’s assume the content pagination is defined as:
aaa
<!--nextpage-->
bbb
<!--nextpage-->
ccc
Then the first page is:
aaa
The second one becomes:
aaa
bbb
and the third one displays as:
aaa
ccc
Update:
To have the first page as:
aaa
bbb
the second one as:
aaa
ccc
etc, then we only need to comment out this line:
// Add the first page again
array_unshift( $pages, $firstpage );