WordPress at a glance
function is not described

WP::query_posts() public WP 2.0.0

Set up the Loop based on the query variables.

{} It's a method of the class: WP{}

No Hooks.

Return

null. Null. Nothing.

Usage

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

Notes

  • Global. WP_Query. $wp_the_query WordPress Query object.

Changelog

Since 2.0.0 Introduced.

Code of WP::query_posts() WP 5.7

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