This is the root of the loop. It handles all the intricacies of a WordPress request.

It is an instance of WP_Query class. The global variable is initiated in [wordpress root folder]/wp-includes/functions.php. WordPress has provided wrapper functions to use wp_query and its operations. Read more about them at Conditional Tags and Query Posts.

Back to full list of global variables.

Technorati tags: wp_query

5 Responses to “wp_query”

  1. Abhijit Nadgouda @ iface » Blog Archive » Ultimate Wordpress RSS Feed Customization Says:

    […] Now, more customization for RSS feeds in WordPress! WordPress executes the WordPress Loop and the associated queries for producing the feeds. This implies that rules that apply for creating index, archive, searchor custom queries can be used for creating the feeds. It is kind of single-source publishing, same queries to be used for same content, irrespective of whether it displayed on the web or syndicated via the feed. […]

  2. Abhijit Nadgouda @ iface » Blog Archive » page Says:

    […] This global variable stores the requested page number of a multipage post that has to be shown. It is set in the function setup_postdata($post) defined in [wordpress root folder]/wp-includes/functions.php. The variable page in the WordPress request (query string) is used to set this global variable. The multipage content of the post is stored in the global variable pages. […]

  3. Abhijit Nadgouda @ iface » Blog Archive » m Says:

    […] m is a WordPress query string variable which can be used to request posts posted at a certain time. It is parsed in the method get_posts() of wp_query. […]

  4. Abhijit Nadgouda @ iface » posts_per_page Says:

    […] posts_per_page is set in the method get_posts of WP_Query. […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: