Предупреждение: count (): Параметр должен быть массивом или объектом, который реализует Countable в C: \ wamp64 \ www \ wp-includes \ post-template.php в строке 293 - PullRequest
0 голосов
/ 07 мая 2019

Я был бы очень признателен за помощь. Это тема 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] ) ) );
    }
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...