ifacethoughts

wp_query

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

Discussion [Participate or Link]

  1. Abhijit Nadgouda @ iface » Wordpress Global Variables said:

    […] $wp_query […]

  2. Abhijit Nadgouda @ iface » Blog Archive » Ultimate Wordpress RSS Feed Customization said:

    […] 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. […]

  3. Abhijit Nadgouda @ iface » Blog Archive » page said:

    […] 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. […]

  4. Abhijit Nadgouda @ iface » Blog Archive » m said:

    […] 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. […]

  5. Abhijit Nadgouda @ iface » posts_per_page said:

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

  6. iface thoughts » Blog Archive » m said:

    […] 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. […]

  7. Ultimate Wordpress RSS Feed Customization | iface thoughts said:

    […] 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 […]

  8. Abhijit Nadgouda’s List of WordPress Global Variables « Lorelle on WordPress said:

    […] and Page Variables: wp_query, posts, more, posts_per_page, max_num_pages, numpages, page, pages, multipage, paged, post, id, […]

Say your thought!

If you want to use HTML you can use these tags: <a>, <em>, <strong>, <abbr>, <code>, <blockquote>. Closing the tags will be appreciated as this site uses valid XHTML.

freshthoughts

contactme

Abhijit Nadgouda
iface Consulting
India
+91 9819820312
My bookmarks

badgesand...

This is the weblog of Abhijit Nadgouda where he writes down his thoughts on software development and related topics. You are invited to subscribe to the feed to stay updated or check out more subscription options. Or you can choose to browse by one of the topics.