WP::query_posts()publicWP 2.0.0

Set up the Loop based on the query variables.

Method of the class: WP{}

No Hooks.

Return

null. Nothing (null).

Usage

global $wp;
$wp->query_posts();

Notes

  • Global. WP_Query. $wp_the_query WordPress Query object.

Changelog

Since 2.0.0 Introduced.

WP::query_posts() code WP 6.5.2

public function query_posts() {
	global $wp_the_query;
	$this->build_query_string();
	$wp_the_query->query( $this->query_vars );
}