tag_slug__and (array) - use tag slugs. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the Unable to convert latex to wolfram alpha's text Is total distance walked specific to a single Pokémon, or to a species of Pokémon? rewind_posts() Reset $current_post and $post. &query( $query ) Call parse_query() and get_posts(). Source
If this is used in the same query as post__in, it will be ignored. Public custom statuses are also included by default. Accepts strtotime()-compatible string, or array of 'year', 'month', 'day' values: year (string) Accepts any four-digit year. Browse other questions tagged query-posts attachments array order id or ask your own question. http://stackoverflow.com/questions/13459410/wordpress-wp-query-orderby-not-working
meta_value_num (number) - Custom field value. tag_id (int) - use tag id. Over-rides posts_per_page and showposts on pages where is_archive() or is_search() would be true. Possible values are 'term_id', 'name', 'slug' or 'term_taxonomy_id'.
Set to 0 to return only top-level entries. You shouldn't alter the properties directly, but instead use the methods to interact with them. To begin with, have_posts(), which calls $wp_query->have_posts(), is called to see if there are any posts to show. Remove_all_filters('posts_orderby'); Giving out login details is dangerous.
Use 'posts_per_page'=>-1 to show all posts (the 'offset' parameter is ignored with a -1 value). There are two other options: 'ids' - Return an array of post IDs. 'id=>parent' - Return an array of stdClass objects with ID and post_parent properties. Thanks though this suggestion was the one I was looking for! post_type (string / array) - use post types.
fields (string) - Which fields to return. Meta_value_num relation (string) - The logical relationship between each inner meta_query array when there is more than one. As it is hard to keep the codex up to date, please inspect the get_posts(); function inside the WP_Query class yourself (/wp-includes/query.php). Browse other questions tagged php sql wordpress or ask your own question.
Skip to toolbar About WordPress About WordPress WordPress.org Documentation Support Forums Feedback Search Log In current community chat WordPress Development WordPress Development Meta your communities Sign up or log in to p (int) - use post id. Wp_query Orderby How do you write a letter of recommendation for someone who got an A in your class, but who you've never talked to outside of class? Pre_get_posts Not the answer you're looking for?
Previous versions of this answer: 01/16/12 at 6:16am 01/16/12 6:49am Jennie Routley says: Thank you! this contact form Thanks!
I tried orderby name, id, title, date; I tried ASC and DESC. does your code not return any results or ...)? –Manzabar Mar 23 '11 at 12:55 @t31los, tried the quotes - thanks but still no luck. @Manzabar - thank you true: do not move sticky posts to the start of the set. http://europrolink.com/not-working/paging-not-working-in-wordpress.php Default: 1.
next_post() (to be used when in The Loop) Advance onto the next post in $posts. Get_terms Accepts numbers 1-31. Also, when you registered the post_type did you set it to 'hierarchical' => true, ?
Do you have set WP_DEBUG that you get error messages. Sébastien | French WordpressDesigner, Jennie Routley, Luis Abarca voted on this question. type (string) - Custom field type. Check This Out cat (int) - use category id.
Here is the code: