wp_query orderby not working in 2.9.1
-
Hello everybody,
Sorry for reposting but I’ve just seen I’ve posted my old one in a solve case which may not be good.
I’ve just set up 2.9.1 and it seems that orderby does not work. Here is my code :
$my_query = new WP_Query('showposts=2&cat=33&orderby=meta_value&meta_key=Date_Tri&order=desc'); echo $my_query->query; $wpdb->show_errors()."<br />"; while ($my_query->have_posts()) { $my_query->the_post(); echo "<h2><b><u>"; echo get_post_meta($post->ID, 'Date_Tri', true).the_title(); echo "</u></b></h2>"; the_content(); }
Date_tri is some kind of text date ( 2009-02-15 for instance)
which gives :
showposts=2&cat=33&orderby=meta_value&meta_key=Date_Tri&order=desc
testt2009-01-01
Post one text ….Los Van Van au Bataclan le 2 mars 20102009-01-02
Post two text ….Have I missed anything ?
Thank you for your help
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘wp_query orderby not working in 2.9.1’ is closed to new replies.