Codex tools: Log in
Contents |
An array of query vars are available for WordPress users or developers to utilise in order to query for particular types of content or to aid in theme and/or plugin design and functionality.
Public query vars are those available and usable via a direct URL query in the form of.
example.net/?var1=value1&var2=value2
Private query vars cannot be used in the URL, although WordPress will accept a query string with private query vars, the values will not be passed into the query and should be placed directly into the query. An example is given below.
query_posts('privatevar=myvalue');
Custom post types and taxonomies can also be queried publicly.
example.net/?post_type=value1
In this example, value1 would be the post type slug you want to query. This would return all posts that match the specified post_type slug.
example.net/?tax1=term1
In this example, tax1 is the taxonomy slug and term1 is the term within that taxonomy that you would like to look up. This would return all posts (regardless of post_type) matching that taxonomy term.
Queries combining multiple values can be combined to form more complex, granular queries. For instance, to find only posts of a given post type AND taxonomy term, you can specify both.
See this list:
var $public_query_vars = array('m', 'p', 'posts', 'w', 'cat', 'withcomments', 'withoutcomments', 's', 'search', 'exact', 'sentence', 'debug', 'calendar', 'page', 'paged', 'more', 'tb', 'pb', 'author', 'order', 'orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second', 'name', 'category_name', 'tag', 'feed', 'author_name', 'static', 'pagename', 'page_id', 'error', 'comments_popup', 'attachment', 'attachment_id', 'subpost', 'subpost_id', 'preview', 'robots', 'taxonomy', 'term', 'cpage', 'post_type');
var $private_query_vars = array('offset', 'posts_per_page', 'posts_per_archive_page', 'showposts', 'nopaging', 'post_type', 'post_status', 'category__in', 'category__not_in', 'category__and', 'tag__in', 'tag__not_in', 'tag__and', 'tag_slug__in', 'tag_slug__and', 'tag_id', 'post_mime_type', 'perm', 'comments_per_page');
via http://www.cleancode.co.nz/blog/731/post-data-wordpress-permalink-404
This list needs more work, if you have something to add go ahead.