wordpress / latest / functions / wp.html

wp( string|array $query_vars = '' )

Sets up the WordPress query.

Parameters

$query_vars string|array Optional
Default WP_Query arguments.

Default: ''

Source

File: wp-includes/functions.php. View all references

function wp( $query_vars = '' ) {
	global $wp, $wp_query, $wp_the_query;

	$wp->main( $query_vars );

	if ( ! isset( $wp_the_query ) ) {
		$wp_the_query = $wp_query;
	}
}

Uses

Uses Description

Used By

Used By Description

Changelog

Version Description
2.0.0 Introduced.

© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp