Я был бы очень признателен за помощь. Это тема WP-Script WP.
Строка 293 выделена жирным шрифтом (**):
}
$output = '';
$has_teaser = false;
// If post password required and it doesn't match the cookie.
if ( post_password_required( $post ) ) {
return get_the_password_form( $post );
}
**if ( $page > count( $pages ) ) { // if the requested page doesn't exist**
$page = count( $pages ); // give them the highest numbered page that DOES exist
}
$content = $pages[ $page - 1 ];
if ( preg_match( '/<!--more(.*?)?-->/', $content, $matches ) ) {
$content = explode( $matches[0], $content, 2 );
if ( ! empty( $matches[1] ) && ! empty( $more_link_text ) ) {
$more_link_text = strip_tags( wp_kses_no_null( trim( $matches[1] ) ) );
}