diff --git a/wp-includes/query.php b/wp-includes/query.php index fd93c525bd..04286aa517 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -3656,12 +3656,15 @@ function setup_postdata( $post ) { if ( is_single() || is_page() || is_feed() ) $more = 1; $content = $post->post_content; - if ( strpos( $content, '' ) ) { + if ( false !== strpos( $content, '' ) ) { if ( $page > 1 ) $more = 1; $content = str_replace( "\n\n", '', $content ); $content = str_replace( "\n", '', $content ); $content = str_replace( "\n", '', $content ); + // Ignore nextpage at the beginning of the content. + if ( 0 === strpos( $content, '' ) ) + $content = substr( $content, 15 ); $pages = explode('', $content); $numpages = count($pages); if ( $numpages > 1 )