WordPress WP

Author Parameters #Author Parameters

Show posts associated with certain author.

author (int) – use author id. author_name (string) – use ‘user_nicename‘ – NOT name. author__in (array) – use author id (available since version 3.7). author__not_in (array) – use author id (available since version 3.7).

Show Posts for one Author

Display posts by author, using author id:


Display posts that are in multiple categories. This shows posts that are in both categories 2 and 6:


To display posts from either category 2 OR 6, you could use cat as mentioned above, or by using category__in (note this does not show posts from any children of these categories):


Top ↑

Tag Parameters #Tag Parameters

Show posts associated with certain tags.

tag (string) – use tag slug. tag_id (int) – use tag id. tag__and (array) – use tag ids. tag__in (array) – use tag ids. tag__not_in (array) – use tag ids. tag_slug__and (array) – use tag slugs. tag_slug__in (array) – use tag slugs.

Display posts that have one tag, using tag slug:


To display posts from either tag id 37 or 47, you could use tag as mentioned above, or explicitly specify by using tag__in:


The tag_slug__in and tag_slug__and behave much the same, except match against the tag’s slug.

Top ↑

Taxonomy Parameters #Taxonomy Parameters

Show posts associated with certain taxonomy.

{tax} (string) – use taxonomy slug. (Deprecated since version 3.1 in favor of ‘tax_query‘). tax_query (array) – use taxonomy parameters (available since version 3.1). relation (string) – The logical relationship between each inner taxonomy array when there is more than one. Possible values are ‘AND’, ‘OR’. Do not use with a single inner taxonomy array. taxonomy (string) – Taxonomy. field (string) – Select taxonomy term by. Possible values are ‘term_id’, ‘name’, ‘slug’ or ‘term_taxonomy_id’. Default value is ‘term_id’. terms (int/string/array) – Taxonomy term(s). include_children (boolean) – Whether or not to include children for hierarchical taxonomies. Defaults to true. operator (string) – Operator to test. Possible values are ‘IN’, ‘NOT IN’, ‘AND’, ‘EXISTS’ and ‘NOT EXISTS’. Default value is ‘IN’.

Important Note: tax_query takes an array of tax query arguments arrays (it takes an array of arrays).
This construct allows you to query multiple taxonomies by using the relation parameter in the first (outer) array to describe the boolean relationship between the taxonomy arrays.

Simple Taxonomy Query:

Display posts tagged with bob, under people custom taxonomy:


Expand full source code

Display posts that are in the quotes category OR have the quote post format:


Expand full source code

Nested Taxonomy Handling:

The 'tax_query' clauses can be nested, to plex queries. Example: Display posts that are in the quotes category OR both have the quote post format AND are in the wisdom category:


                    'taxonomy' = 'post_format',                     'field'    = 'slug',                     'terms'    = array( 'post-format-quote' ),                         ),                         array(                                 'taxonomy' = 'category',                                 'field'    = 'slug',                                 'terms'    = array( 'wisdom' ),                         ),         ),     ), $query = new WP_Query( $args );

Prepending a term with a hyphen will exclude posts matching that term. Eg, 'pillow -sofa' will return posts containing ‘pillow’ but not ‘sofa’ (available since Version 4.4).

Top ↑

Post Page Parameters #Post Page Parameters

Display content based on post and page parameters. Remember that default post_type is only set to display posts but not pages.

p (int) – use post id. name (string) – use post slug. page_id (int) – use page id. pagename (string) – use page slug. post_parent (int) – use page id to return only child pages. Set to 0 to return only top-level entries. post_parent__in (array) – use post ids. Specify posts whose parent is in an array. (available since version 3.6) post_parent__not_in (array) – use post ids. Specify posts whose parent is not in an array. (available since version 3.6) post__in (array) – use post ids. Specify posts to retrieve. ATTENTION If you use sticky posts, they will be included (prepended!) in the posts you retrieve whether you want it or not. To suppress this behaviour use ignore_sticky_posts. post__not_in (array) – use post ids. Specify post NOT to retrieve. post_name__in (array) – use post slugs. Specify posts to retrieve. (Will be available in version 4.4)

NOTE: Ticket #28099: Passing an empty array to post__in will return has_posts() as true (and all posts will be returned). Logic should be used before hand to determine if WP_Query should be used in the event that the array being passed to post__in is empty.

Display post by ID:


Display child page using the slug of the parent and the child page, separated by a slash (e.g. ‘parent_slug/child_slug’):


$query = new WP_Query( array( 'post_type' = 'page', 'post__in' = array( 2, 5, 12, 14, 20 ) ) );
$query = new WP_Query( array( 'post_type' = 'post', 'post__not_in' = array( 2, 5, 12, 14, 20 ) ) );

Note: bine post__in and post__not_in in the same query.

Also note that using a string ma separated list will not work here. If you’re passing a variable, make sure it’s a proper array of integer values:


$exclude_ids = '1,2,3'; $query = new WP_Query( array( 'post__not_in' = array( $exclude_ids ) ) ); // This WILL work $exclude_ids = array( 1, 2, 3 ); $query = new WP_Query( array( 'post__not_in' = $exclude_ids ) );

Top ↑

Password Parameters #Password Parameters

Show content based on post and page parameters. Remember that default post_type is only set to display posts but not pages.

has_password (bool) – true for posts with passwords ; false for posts without passwords ; null for all posts with and without passwords (available since version 3.9). post_password (string) – show posts with a particular password (available since version 3.9)

Display only password protected posts:


Top ↑

Post Type Parameters #Post Type Parameters

Show posts associated with certain type.

post_type (string / array) – use post types. Retrieves posts by post types, default value is ‘post‘. If ‘tax_query‘ is set for a query, the default es ‘any‘; ‘post‘ – a post. ‘page‘ – a page. ‘revision‘ – a revision. ‘attachment‘ – an attachment. Whilst the default WP_Query post_status is ‘publish’, attachments have a default post_status of ‘inherit’. This means no attachments will be returned unless you also explicitly set post_status to ‘inherit’ or ‘any’. See Status parameters section below. ‘nav_menu_item‘ – a navigation menu item ‘any‘ – retrieves any type except revisions and types with ‘exclude_from_search’ set to true.
** Custom Post Types (e.g. movies)

Display ‘any‘ post type (retrieves any type except revisions and types with ‘exclude_from_search’ set to TRUE):


Status Parameters

Show posts associated with certain post status.

post_status (string / array) – use post status. Retrieves posts by post status. Default value is ‘publish‘, but if the user is logged in, ‘private‘ is added. Public custom post statuses are also included by default. And if the query is run in an admin context (administration area or AJAX call), protected statuses are added too. By default protected statuses are ‘future‘, ‘draft‘ and ‘pending‘. ‘publish‘ – a published post or page. ‘pending‘ – post is pending review. ‘draft‘ – a post in draft status. ‘auto-draft‘ – a newly created post, with no content. ‘future‘ – a post to publish in the future. ‘private‘ – not visible to users who are not logged in. ‘inherit‘ – a revision. see get_children(). ‘trash‘ – post is in trashbin (available since version 2.9). ‘any‘ – retrieves any status except those from post statuses with ‘exclude_from_search’ set to true (i.e. trash and auto-draft).
Comment Parameters

Since Version 4.9 Introduced the `$comment_count` parameter. It can be either an Integer or an Array.

comment_count (int) – The ments your CPT has to have ( Search operator will do a ‘=’ operation ) comment_count (Array) – If comment_count is an array, it should have two arguments: ‘value‘ – The ments your post has to paring ‘compare‘ – The search operator. Possible values are ‘=’, ‘!=’, ‘ ’, ‘ =’, ‘ ', ' ='. Default value is '='.
nopaging (boolean) – show all posts or use pagination. Default value is ‘false’, use paging. posts_per_page (int) – number of post to show per page (available since version 2.1, replaced showposts parameter). Use 'posts_per_page'= -1 to show all posts (the 'offset' parameter is ignored with a -1 value). Set the ‘paged’ parameter if pagination is off after using this parameter. Note: if the query is in a feed, wordpress overwrites this parameter with the stored ‘posts_per_rss’ option. To reimpose the limit, try using the ‘post_limits’ filter, or filter ‘pre_option_posts_per_rss’ and return -1 posts_per_archive_page (int) – number of posts to show per page – on archive pages only. Over-rides posts_per_page and showposts on pages where is_archive() or is_search() would be true. offset (int) – number of post to displace or pass over. Warning: Setting the offset parameter overrides/ignores the paged parameter and breaks pagination. The 'offset' parameter is ignored when 'posts_per_page'= -1 (show all posts) is used. paged (int) – number of page. Show the posts that would normally show up just on page X when using the “Older Entries” link. page (int) – number of page for a static front page. Show the posts that would normally show up just on page X of a Static Front Page. ignore_sticky_posts (boolean) – ignore post stickiness (available since version 3.1, replaced caller_get_posts parameter). false (default): move sticky posts to the start of the set. true: do not move sticky posts to the start of the set.

Display x posts per page:


Display posts from the current page and set the ‘paged’ parameter to 1 when the query variable is not set (first page).


$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1; $query = new WP_Query( array( 'paged' = $paged ) );

Pagination Note: Use get_query_var('page'); if you want your query to work in a page template that you’ve set as your static front page. The query variable ‘page’ also holds the pagenumber for a single paginated Post or Page that includes the  !--nextpage--  quicktag in the post content.

Display posts from current page on a static front page:


$paged = ( get_query_var('page') ) ? get_query_var('page') : 1; $query = new WP_Query( array( 'paged' = $paged ) );
$sticky = get_option( 'sticky_posts' ); $query = new WP_Query( array( 'p' = $sticky[0] ) );
    'posts_per_page'      = 1,     'post__in'            = get_option( 'sticky_posts' ),     'ignore_sticky_posts' = 1, $query = new WP_Query( $args );

Exclude sticky posts from a category:

Return ALL posts within the category, but don’t show sticky posts at the top. The ‘sticky posts’ will still show in their natural position (e.g. by date):


$query = new WP_Query( array( 'ignore_sticky_posts' = 1, 'posts_per_page' = 3, 'cat' = 6 );

Exclude sticky posts from a category:

Return posts within the category, but exclude pletely, and adhere to paging rules:


$paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1; $sticky = get_option( 'sticky_posts' ); $args = array(     'cat'                 = 3,     'ignore_sticky_posts' = 1,     'post__not_in'        = $sticky,     'paged'               = $paged, $query = new WP_Query( $args );

Top ↑

Order Orderby Parameters #Order Orderby Parameters

Sort retrieved posts.

order (string | array) – Designates the ascending or descending order of the ‘orderby‘ parameter. Defaults to ‘DESC’. An array can be used for multiple order/orderby sets. ‘ASC‘ – ascending order from lowest to highest values (1, 2, 3; a, b, c). ‘DESC‘ – descending order from highest to lowest values (3, 2, 1; c, b, a).
orderby (string | array) – Sort retrieved posts by parameter. Defaults to ‘date (post_date)’. One or more options can be passed. ‘none‘ – No order (available since version 2.8). ‘ID‘ – Order by post id. Note the capitalization. ‘author‘ – Order by author. ‘title‘ – Order by title. ‘name‘ – Order by post name (post slug). ‘type‘ – Order by post type (available since version 4.0). ‘date‘ – Order by date. ‘modified‘ – Order by last modified date. ‘parent‘ – Order by post/page parent id. ‘rand‘ – Random order. ‘comment_count‘ – Order by ments (available since version 2.9). ‘relevance‘ – Order by search terms in the following order: First, whether the entire sentence is matched. Second, if all the search terms are within the titles. Third, if any of the search terms appear in the titles. And, fourth, if the full sentence appears in the contents. ‘menu_order‘ – Order by Page Order. Used most often for pages (Order field in the Edit Page Attributes box) and for attachments (the integer fields in the Insert / Upload Media Gallery dialog), but could be used for any post type with distinct ‘menu_order‘ values (they all default to 0). ‘meta_value‘ – Note that a ‘meta_key=keyname‘ must also be present in the query. Note also that the sorting will be alphabetical which is fine for strings (i.e. words), but can be unexpected for numbers (e.g. 1, 3, 34, 4, 56, 6, etc, rather than 1, 3, 4, 6, 34, 56 as you might naturally expect). Use ‘meta_value_num‘ instead for numeric values. You may also specify ‘meta_type‘ if you want to cast the meta value as a specific type. Possible values are ‘NUMERIC’, ‘BINARY’, ‘CHAR’, ‘DATE’, ‘DATETIME’, ‘DECIMAL’, ‘SIGNED’, ‘TIME’, ‘UNSIGNED’, same as in ‘$meta_query‘. When using ‘meta_type’ you can also use ‘meta_value_*’ accordingly. For example, when using DATETIME as ‘meta_type’ you can use ‘meta_value_datetime’ to define order structure. ‘meta_value_num‘ – Order by numeric meta value (available since version 2.8). Also note that a ‘meta_key=keyname‘ must also be present in the query. This value allows for numerical sorting as noted above in ‘meta_value‘. ‘post__in‘ – Preserve post ID order given in the post__in array (available since version 3.5). Note – the value of the order parameter does not change the resulting sort order. ‘post_name__in‘ – Preserve post slug order given in the ‘post_name__in’ array (available since Version 4.6). Note – the value of the order parameter does not change the resulting sort order. ‘post_parent__in‘ -Preserve post parent order given in the ‘post_parent__in’ array (available since Version 4.6). Note – the value of the order parameter does not change the resulting sort order.

Display posts sorted by ‘menu_order’ with a fallback to post ‘title’, in a descending order:


Display pages ordered by ‘title’ and ‘menu_order’ with different sort orders (ASC/DESC) (available since version 4.0):


    'orderby'  = array( 'meta_value_num' = 'DESC', 'title' = 'ASC' ),     'meta_key' = 'age' $query = new WP_Query( $args );

‘orderby’ with ‘meta_value’ and custom post type

Display posts of type ‘my_custom_post_type’, ordered by ‘age’, and filtered to show only ages 3 and 4 (using meta_query).


Expand full source code

‘orderby’ with multiple ‘meta_key’s

If you wish to order by two different pieces of postmeta (for example, City first and State second), you bine and link your meta query to your orderby array using ‘named meta queries’. See the example below:


Collapse full source code

(props to cybmeta on WPSE for this example).

Top ↑

Date Parameters #Date Parameters

Show posts associated with a certain time and date period.

year (int) – 4 digit year (e.g. 2011). monthnum (int) – Month number (from 1 to 12). w (int) – Week of the year (from 0 to 53). Uses mand. The mode is dependent on the “start_of_week” option. day (int) – Day of the month (from 1 to 31). hour (int) – Hour (from 0 to 23). minute (int) – Minute (from 0 to 60). second (int) – Second (0 to 60). m (int) – YearMonth (For e.g.: 201307). date_query (array) – Date parameters (available since version 3.7). year (int) – 4 digit year (e.g. 2011). month (int) – Month number (from 1 to 12). week (int) – Week of the year (from 0 to 53). day (int) – Day of the month (from 1 to 31). hour (int) – Hour (from 0 to 23). minute (int) – Minute (from 0 to 59). second (int) – Second (0 to 59). after (string/array) – Date to retrieve posts after. Accepts strtotime()-compatible string, or array of ‘year’, ‘month’, ‘day’ values: year (string) Accepts any four-digit year. Default is empty. month (string) The month of the year. Accepts numbers 1-12. Default: 12. day (string) The day of the month. Accepts numbers 1-31. Default: last day of month.
before (string/array) – Date to retrieve posts before. Accepts strtotime()-compatible string, or array of ‘year’, ‘month’, ‘day’ values: year (string) Accepts any four-digit year. Default is empty. month (string) The month of the year. Accepts numbers 1-12. Default: 1. day (string) The day of the month. Accepts numbers 1-31. Default: 1.
inclusive (boolean) – For after/before, whether exact value should be matched or not’. compare (string) – See WP_Date_Query::pare(). column (string) – Posts column to query against. Default: ‘post_date’. relation (string) – OR or AND, how the sub-arrays pared. Default: AND.
$today = getdate(); $query = new WP_Query( 'year=' . $today['year'] . ' monthnum=' . $today['mon'] . ' day=' . $today['mday'] );

Expand full source code

Note that if a strtotime()-compatible string with just a date was passed in the before parameter, this will be converted to 00:00:00 on that date. In this case, even if inclusive was set to true, the date would not be included in the query. If you want a before date to be inclusive, include the time as well, such as 'before' = ':59', or use the array format, which is adjusted automatically if inclusive is set.

Return posts made over a year ago but modified in the past month


Expand full source code

The 'date_query' clauses can be nested, in order plex queries. See Taxonomy Parameters for details on the syntax.

Top ↑

Custom Field (post meta) Parameters #Custom Field (post meta) Parameters

Show posts associated with a certain custom field.

This part of the query is parsed by WP_Meta_Query, so check the docs for it as well in case this list of arguments isn’t up to date.

meta_key (string) – Custom field key. meta_value (string) – Custom field value. meta_value_num (number) – Custom field value. pare (string) – Operator to test the ‘meta_value‘. Possible values are ‘=’, ‘!=’, ‘ ’, ‘ =’, ‘ ‘, ‘ =’, ‘LIKE’, ‘NOT LIKE’, ‘IN’, ‘NOT IN’, ‘BETWEEN’, ‘NOT BETWEEN’, ‘NOT EXISTS’, ‘REGEXP’, ‘NOT REGEXP’ or ‘RLIKE’. Default value is ‘=’. meta_query (array) – Custom field parameters (available since version 3.1). relation (string) – The logical relationship between each inner meta_query array when there is more than one. Possible values are ‘AND’, ‘OR’. Do not use with a single inner meta_query array.
key (string) – Custom field key. value (string|array) – Custom field value. It can be an array pare is 'IN', 'NOT IN', 'BETWEEN', or 'NOT BETWEEN'. You don’t have to specify a value when using the 'EXISTS' or 'NOT EXISTS' comparisons in WordPress 3.9 and up.
(Note: Due to bug #23268, value is required for parisons to work correctly prior to 3.9. You must supply some string for the value parameter. An empty string or NULL will NOT work. However, any other string will do the trick and will NOT show up in your SQL when using NOT EXISTS. Need inspiration? How about 'bug #23268'.) compare (string) – Operator to test. Possible values are ‘=’, ‘!=’, ‘ ’, ‘ =’, ‘ ‘, ‘ =’, ‘LIKE’, ‘NOT LIKE’, ‘IN’, ‘NOT IN’, ‘BETWEEN’, ‘NOT BETWEEN’, ‘EXISTS’ and ‘NOT EXISTS’. Default value is ‘=’. type (string) – Custom field type. Possible values are ‘NUMERIC’, ‘BINARY’, ‘CHAR’, ‘DATE’, ‘DATETIME’, ‘DECIMAL’, ‘SIGNED’, ‘TIME’, ‘UNSIGNED’. Default value is ‘CHAR’.

The ‘type’ DATE works with the ‘compare’ value BETWEEN only if the date is stored at the format YYYY-MM-DD and tested with this format.

Important Note: meta_query takes an array of meta query arguments arrays (it takes an array of arrays) – you can see this in the examples below.
This construct allows you to query multiple metadatas by using the relation parameter in the first (outer) array to describe the boolean relationship between the meta queries. Accepted arguments are ‘AND’, ‘OR’. The default is ‘AND’.

Simple Custom Field Query:

Display posts where the custom field key is ‘color’, regardless of the custom field value:


Display posts where the custom field value is ‘blue’, regardless of the custom field key:


Display page where the custom field value is ‘blue’, regardless of the custom field key:


Display posts where the custom field key is ‘color’ and the custom field value is ‘blue’:


Display posts where the custom field key is ‘color’ and the custom field value IS NOT ‘blue’:


Display posts where the custom field key is a set date and the custom field value is now. Displays only posts which date has not passed.


    'meta_key'     = 'event_date',     'meta_value'   = date( "Ymd" ), // change to how "event date" is stored     'pare' = ' ', $query = new WP_Query( $args );

Display ‘product'(s) where the custom field key is ‘price’ and the custom field value that is LESS THAN OR EQUAL TO 22.
By using the ‘meta_value’ parameter the value 99 will be considered greater than 100 as the data are stored as ‘strings’, not ‘numbers’. parison use ‘meta_value_num’.


Display posts with a custom field value of zero (0), regardless of the custom field key:


(Note that meta_query expects nested arrays, even if you only have one query.)

Display posts from several custom fields:


Expand full source code

Display posts that have meta key ‘color’ NOT LIKE value ‘blue’ OR meta key ‘price’ with values BETWEEN 20 and 100:


Expand full source code

The 'meta_query' clauses can be nested in order plex queries. For example, show productss where color=orange OR color=red size=small translates to the following:


Top ↑

Permission Parameters #Permission Parameters

Show posts if user has the appropriate capability

perm (string) – User permission.

Display published and private posts, if the user has the appropriate capability:


Top ↑

Mime Type Parameters #Mime Type Parameters

Used with the attachments post type.

post_mime_type (string/array) – Allowed mime types.

Get attachments that are gif images:

Get gif images and remember that by default the attachment’s post_status is set to inherit.


Get attachments that are not images:

To exclude certain mime types you first need to get all mime types using get_allowed_mime_types() and run a difference between arrays of what you want and the allowed mime types with array_diff().


$unsupported_mimes  = array( 'image/jpeg', 'image/gif', 'image/png', 'image/bmp', 'image/tiff', 'image/x-icon' ); $all_mimes          = get_allowed_mime_types(); $accepted_mimes     = array_diff( $all_mimes, $unsupported_mimes ); $args           = array(     'post_type'         = 'attachment',     'post_status'       = 'inherit',     'post_mime_type'    = $accepted_mimes, $query          = new WP_Query( $query_args );

Top ↑

Caching Parameters #Caching Parameters

Stop the data retrieved from being added to the cache.

cache_results (boolean) – rmation cache. update_post_meta_cache (boolean) – rmation cache. update_post_term_cache (boolean) – rmation cache.

Show Posts without rmation to the cache

Display 50 posts, but don’t rmation to the cache:


Show Posts without adding rmation to the cache

Display 50 posts, but don’t add rmation to the cache:


Show Posts without adding rmation to the cache

Display 50 posts, but don’t add rmation to the cache:


In general usage you should not need to use these, adding to the cache is the right thing to do, however they may be useful in specific circumstances. An example of such circumstances might be when using a WP_Query to retrieve a list of post titles and URLs to be displayed, but in which rmation about the post will be used and the taxonomy and meta data won’t be needed. By not rmation, you can save time from the extra unnecessary SQL queries.

Note: If a persistent object cache backend (such as memcached) is used, these flags are set to false by default since there is no need to update the cache every page load when a persistent cache exists.

Top ↑

Return Fields Parameter #Return Fields Parameter

Set return values.

fields (string) – Which fields to return. There are three options: 'all' – Return all fields (default). 'ids' – Return an array of post IDs. 'id= parent' – Return an array of stdClass objects with ID and post_parent properties.

Passing anything else will return all fields (default) – an array of post objects.


Top ↑

Methods #Methods __call — Make private/protected methods readable patibility. __construct — Constructor. __get — Make private properties readable patibility. __isset — Make private properties checkable patibility. __unset — Make private properties settable patibility. fill_query_vars — Fills in the query variables, which do not exist within the parameter. generate_postdata — Generate post data. get — Retrieve query variable. get_posts — Retrieves an array of posts based on query variables. get_queried_object — Retrieve queried object. get_queried_object_id — Retrieve ID of the current queried object. get_search_stopwords — Retrieve stopwords used when parsing search terms. ments — Whether there ments available. have_posts — Determines whether there are more posts available in the loop. init — Initiates object properties and sets default values. init_query_flags — Resets query flags to false. is_404 — Is the query a 404 (returns no results)? is_archive — Is the query for an existing archive page? is_attachment — Is the query for an existing attachment page? is_author — Is the query for an existing author archive page? is_category — Is the query for an existing category archive page? is_comment_feed — Is the query ments feed? is_comments_popup — Whether the current URL is ments popup window. — deprecated is_date — Is the query for an existing date archive? is_day — Is the query for an existing day archive? is_embed — Is the query for an embedded post? is_favicon — Is the query for the favicon.ico file? is_feed — Is the query for a feed? is_front_page — Is the query for the front page of the site? is_home — Is the query for the blog homepage? is_main_query — Is the query the main query? is_month — Is the query for an existing month archive? is_page — Is the query for an existing single page? is_paged — Is the query for paged result and not for the first page? is_post_type_archive — Is the query for an existing post type archive page? is_preview — Is the query for a post or page preview? is_privacy_policy — Is the query for the Privacy Policy page? is_robots — Is the query for the robots.txt file? is_search — Is the query for a search? is_single — Is the query for an existing single post? is_singular — Is the query for an existing single post of any post type (post, attachment, page, custom post types)? is_tag — Is the query for an existing tag archive page? is_tax — Is the query for an existing custom taxonomy archive page? is_time — Is the query for a specific time? is_trackback — Is the query for a trackback endpoint call? is_year — Is the query for an existing year archive? ment_meta — ment ments in the loop. — deprecated lazyload_term_meta — Lazyload term meta for posts in the loop. — deprecated ment — ment index and return WP_Comment object. next_post — Set up the next post and iterate current post index. parse_order — Parse an 'order' query variable and cast it to ASC or DESC as necessary. parse_orderby — Converts the given orderby alias (if allowed) to a properly-prefixed value. parse_query — Parse a query string and set query type booleans. parse_query_vars — Reparse the query vars. parse_search — Generates SQL for the WHERE clause based on passed search terms. parse_search_order — Generates SQL for the ORDER BY condition based on passed search terms. parse_search_terms — Check if the terms are suitable for searching. parse_tax_query — Parses various taxonomy related query vars. query — Sets up the WordPress query by parsing query string. reset_postdata — After looping through a nested query, this function restores the $post global to the current post in this query. ments — ments, ment ment to first. rewind_posts — Rewind the posts and reset post index. set — Set query variable. set_404 — Sets the 404 property and saves whether query is feed. set_found_posts — Set up the amount of found posts and the number of pages (if limit clause was used) for the current query. setup_postdata — Set up global post data. ment — Sets up ment. the_post — Sets up the current post.