WP_Query::is_sitemappublicWP 7.1.0

Determines whether the query is for a sitemap.

Method of the class: WP_Query{}

No Hooks.

Returns

true|false. Whether the query is for a sitemap.

Usage

global $wp_query;
$wp_query->is_sitemap(): bool;

Changelog

Since 7.1.0 Introduced.

WP_Query::is_sitemap() code WP 7.1

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