WordPress at a glance

wp() WP 1.0

Set up the WordPress query.

Works based on: WP::main()

No Hooks.

Return

Null. Nothing.

Usage

wp( $query_vars );
$query_vars(string/array)
Default WP_Query arguments.
Default: ''

Notes

  • Global. WP. $wp_locale
  • Global. WP_Query. $wp_query
  • Global. WP_Query. $wp_the_query

Changelog

Since 2.0.0 Introduced.

Code of wp: wp-includes/functions.php WP 5.2.4

<?php
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;
	}
}

Related Functions

From tag: query

More from category: Main Query

No comments
    Hello, !     Log In . Register