WP_Query::is_main_query(): bool In this article Table of ContentsReturn Source Related Changelog ↑ Back to top 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; } View all references View on Trac View on GitHub Related Used byDescription_resolve_template_for_new_post()wp-includes/block-template.phpSets the current WP_Query to return auto-draft posts. wp_get_loading_attr_default()wp-includes/deprecated.phpGets the default value to use for a loading attribute on an element. WP_Query::parse_query()wp-includes/class-wp-query.phpParses a query string and sets query type booleans. WP_Query::parse_search()wp-includes/class-wp-query.phpGenerates SQL for the WHERE clause based on passed search terms. is_main_query()wp-includes/query.phpDetermines whether the query is the main query. Changelog VersionDescription3.3.0Introduced. User Contributed Notes You must log in before being able to contribute a note or feedback.
User Contributed Notes
You must log in before being able to contribute a note or feedback.