fullflare
Forum Replies Created
-
I confirm Vince75016 analysis. I deactivated AJAX Thumbnail Rebuild and pb is solved for me to.
Forum: Fixing WordPress
In reply to: wp_query orderby not working in 2.9.1Well done Otto42.
I’ve deacivated WP-Sticky plugin (I’ll just have to check side effects now ;o) )The query becomes
SELECT SQL_CALC_FOUND_ROWS wp_fv_posts.* FROM wp_fv_posts INNER JOIN wp_fv_term_relationships ON (wp_fv_posts.ID = wp_fv_term_relationships.object_id) INNER JOIN wp_fv_term_taxonomy ON (wp_fv_term_relationships.term_taxonomy_id = wp_fv_term_taxonomy.term_taxonomy_id) JOIN wp_fv_postmeta ON (wp_fv_posts.ID = wp_fv_postmeta.post_id) WHERE 1=1 AND wp_fv_term_taxonomy.taxonomy = 'category' AND wp_fv_term_taxonomy.term_id IN ('33') AND wp_fv_posts.post_type = 'post' AND (wp_fv_posts.post_status = 'publish' OR wp_fv_posts.post_status = 'private') AND wp_fv_postmeta.meta_key = 'Date_Tri' GROUP BY wp_fv_posts.ID ORDER BY wp_fv_postmeta.meta_value desc LIMIT 0, 2
So it does sort on meta !!Thank you very much.
Forum: Fixing WordPress
In reply to: wp_query orderby not working in 2.9.1SELECT SQL_CALC_FOUND_ROWS wp_fv_posts.*, wp_fv_sticky.sticky_status FROM wp_fv_posts INNER JOIN wp_fv_term_relationships ON (wp_fv_posts.ID = wp_fv_term_relationships.object_id) INNER JOIN wp_fv_term_taxonomy ON (wp_fv_term_relationships.term_taxonomy_id = wp_fv_term_taxonomy.term_taxonomy_id) JOIN wp_fv_postmeta ON (wp_fv_posts.ID = wp_fv_postmeta.post_id) LEFT JOIN wp_fv_sticky ON wp_fv_sticky.sticky_post_id = wp_fv_posts.ID WHERE 1=1 AND wp_fv_term_taxonomy.taxonomy = 'category' AND wp_fv_term_taxonomy.term_id IN ('33') AND wp_fv_posts.post_type = 'post' AND (wp_fv_posts.post_status = 'publish' OR wp_fv_posts.post_status = 'private') AND wp_fv_postmeta.meta_key = 'Date_Tri' GROUP BY wp_fv_posts.ID ORDER BY (wp_fv_sticky.sticky_status = 2 AND wp_fv_sticky.sticky_status IS NOT NULL) DESC, DATE_FORMAT(wp_fv_posts.post_date,'%Y-%m-%d') DESC, (wp_fv_sticky.sticky_status = 1 AND wp_fv_sticky.sticky_status IS NULL) DESC, DATE_FORMAT(wp_fv_posts.post_date,'%T') DESC LIMIT 0, 2
Forum: Fixing WordPress
In reply to: wp_query orderby not working in 2.9.1no I’ve tried , and nothing changed
Forum: Fixing WordPress
In reply to: wp_query orderby not working in custom loopHello everybody,
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