WP_Query::is_main_query(): bool

In this article

Determines whether the query is the main query.

Return

bool Whether the query is the main query.

Source

public function is_main_query() {
	global $wp_the_query;
	return $wp_the_query === $this;
}

Changelog

VersionDescription
3.3.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.