/ptests/samples/omitted/query.phpWordPress Query API
The query API attempts to get which part of WordPress to the user is on. It also provides functionality to getting URL query information.
| Class | Description |
|---|---|
WP_Query
|
The WordPress Query class. |
get_queried_object (line 41)
Retrieve the currently-queried object. Wrapper for $wp_query->get_queried_object()
get_queried_object_id (line 56)
Retrieve ID of the current queried object. Wrapper for $wp_query->get_queried_object_id()
get_query_var (line 24)
Retrieve variable in the WP_Query class.
have_comments (line 792)
Whether there are comments to loop over.
have_posts (line 731)
Whether current WordPress query has results to loop over.
in_the_loop (line 745)
Whether the caller is in the Loop.
is_404 (line 707)
Is the query a 404 (returns no results)?
is_archive (line 142)
Is the query for an archive page?
Month, Year, Category, Author, Post Type archive...
is_attachment (line 183)
Is the query for an attachment page?
is_author (line 207)
Is the query for an author archive page?
If the $author parameter is specified, this function will additionally check if the query is for one of the authors specified.
is_category (line 231)
Is the query for a category archive page?
If the $category parameter is specified, this function will additionally check if the query is for one of the categories specified.
is_comments_popup (line 304)
Whether the current URL is within the comments popup window.
is_comment_feed (line 385)
Is the query for a comments feed?
is_date (line 324)
Is the query for a date archive?
is_day (line 344)
Is the query for a day archive?
is_feed (line 365)
Is the query for a feed?
is_front_page (line 415)
Is the query for the front page of the site?
This is for what is displayed at your site's main URL.
Depends on the site's "Front page displays" Reading Settings 'show_on_front' and 'page_on_front'.
If you set a static page for the front page of your site, this function will return true when viewing that page.
Otherwise the same as @see is_home()
is_home (line 444)
Is the query for the blog homepage?
This is the page which shows the time based blog content of your site.
Depends on the site's "Front page displays" Reading Settings 'show_on_front' and 'page_for_posts'.
If you set a static page for the front page of your site, this function will return true only on the page you set as the "Posts page".
is_month (line 464)
Is the query for a month archive?
is_page (line 491)
Is the query for a single page?
If the $page parameter is specified, this function will additionally check if the query is for one of the pages specified.
is_paged (line 511)
Is the query for paged result and not for the first page?
is_post_type_archive (line 163)
Is the query for a post type archive page?
is_preview (line 531)
Is the query for a post or page preview?
is_robots (line 551)
Is the query for the robots file?
is_search (line 571)
Is the query for a search?
is_single (line 600)
Is the query for a single post?
Works for any post type, except attachments and pages
If the $post parameter is specified, this function will additionally check if the query is for one of the Posts specified.
is_singular (line 627)
Is the query for a single post of any post type (post, attachment, page, ... )?
If the $post_types parameter is specified, this function will additionally check if the query is for one of the Posts Types specified.
is_tag (line 255)
Is the query for a tag archive page?
If the $tag parameter is specified, this function will additionally check if the query is for one of the tags specified.
is_tax (line 284)
Is the query for a taxonomy archive page?
If the $taxonomy parameter is specified, this function will additionally check if the query is for that specific $taxonomy.
If the $term parameter is specified in addition to the $taxonomy parameter, this function will additionally check if the query is for one of the terms specified.
is_time (line 647)
Is the query for a specific time?
is_trackback (line 667)
Is the query for a trackback endpoint call?
is_year (line 687)
Is the query for a specific year?
query_posts (line 90)
Set up The Loop with query parameters.
This will override the current WordPress Loop and shouldn't be used more than once. This must not be used within the WordPress Loop.
rewind_posts (line 760)
Rewind the loop posts.
setup_postdata (line 3541)
Set up global post data.
set_query_var (line 72)
Set query variable.
the_comment (line 806)
Iterate comment index in the comment loop.
the_post (line 773)
Iterate the post index in the loop.
wp_old_slug_redirect (line 3483)
Redirect old slugs to the correct permalink.
Attempts to find the current slug from the past slugs.
wp_reset_postdata (line 119)
After looping through a separate query, this function restores the $post global to the current post in the main query
wp_reset_query (line 106)
Destroy the previous query and set up a new query.
This should be used after query_posts() and before another query_posts(). This will remove obscure bugs that occur when the previous wp_query object is not destroyed properly before another is set up.
Documentation generated on Thu, 29 Sep 2011 01:44:46 +0530 by phpDocumentor 1.4.3