/ Published in: PHP
Expand |
Embed | Plain Text
offset - start from post number order - ASC,DESC author - show posts from one author, use author id or name cat (int) - use category id. category_name (string) - use category slug (NOT name). tag (string) - use tag slug. tag_id (int) - use tag id. taxonomy (string) - Taxonomy. field (string) - Select taxonomy term by ('id' or 'slug') operator (string) - Operator to test. Possible values are 'IN', 'NOT IN', 'AND'. 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. Return just the child Pages. post_type (string / array) - use post types. Retrieves posts by Post Types, default value is 'post'; 'post' - a post. 'page' - a page. 'revision' - a revision. 'attachment' - an attachment. The default WP_Query sets 'post_status'=>'published', but attachments default to 'post_status'=>'inherit' so you'll need to set the status to 'inherit' or 'any'. 'any' - retrieves any type except revisions and types with 'exclude_from_search' set to true. post_status (string / array) - use post status. Retrieves posts by Post Status, default value is 'publish'. '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 with Version 2.9). 'any' - retrieves any status except those from post types with 'exclude_from_search' set to true. meta_key (string) - Custom field key. meta_value (string) - Custom field value. meta_compare (string) - Operator to test the 'meta_value'. Possible values are '!=', '>', '>=', '<', or '<='. Default value is '='. meta_query (array) - Custom field parameters (available with Version 3.1). key (string) - Custom field key. value (string|array) - Custom field value (Note: Array support is limited to a compare value of 'IN', 'NOT IN', 'BETWEEN', or 'NOT BETWEEN') compare (string) - Operator to test. Possible values are '=', '!=', '>', '>=', '<', '<=', 'LIKE', 'NOT LIKE', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN'. Default value is '='.
You need to login to post a comment.
