wp

Set up the WordPress query.

Description

wp( (string) $query_vars = '' ); 

Parameters (1)

0. $query_vars — Optional. (string) => ''
Default WP_Query arguments.

Usage

  1. if ( !function_exists( 'wp' ) ) { 
  2. require_once ABSPATH . WPINC . '/functions.php'; 
  3.  
  4. // Default WP_Query arguments. 
  5. $query_vars = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wp($query_vars); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/functions.php  
  1. functionwp $query_vars = '' ) { 
  2. global $wp, $wp_query, $wp_the_query; 
  3. $wp->main( $query_vars ); 
  4.  
  5. if ( !isset($wp_the_query) ) 
  6. $wp_the_query = $wp_query;