WP_Query::is_404()publicWP 3.1.0

Determines whether the query is a 404 (returns no results).

Метод класса: WP_Query{}

Хуков нет.

Возвращает

true|false. Whether the query is a 404 error.

Использование

global $wp_query;
$wp_query->is_404();

Список изменений

С версии 3.1.0 Введена.

Код WP_Query::is_404() WP 6.7.2

public function is_404() {
	return (bool) $this->is_404;
}