WP_Query::is_archive() public WP 3.1.0
Is the query for an existing archive page?
Archive pages include category, tag, author, date, custom post type, and custom taxonomy based archives.
{} Это метод класса: WP_Query{}
Хуков нет.
Возвращает
true/false. Whether the query is for an existing archive page.
Использование
global $wp_query; $wp_query->is_archive();
Заметки
- Смотрите: WP_Query::is_category()
- Смотрите: WP_Query::is_tag()
- Смотрите: WP_Query::is_author()
- Смотрите: WP_Query::is_date()
- Смотрите: WP_Query::is_post_type_archive()
- Смотрите: WP_Query::is_tax()
Список изменений
С версии 3.1.0 | Введена. |
Код WP_Query::is_archive() WP Query::is archive WP 5.6.2
public function is_archive() {
return (bool) $this->is_archive;
}