rsavard
Forum Replies Created
Viewing 5 replies - 1 through 5 (of 5 total)
-
it’s not working. with
$mam_global_joinoutside the functionYeah! Thanks a lot. I needed to add
$wpdbtoglobal $mam_global_join;and put$mam_global_joininside de function has you told me.function mam_posts_join ($join) { global $wpdb, $mam_global_join; $mam_global_join = "JOIN $wpdb->postmeta metax ON (metax.post_id = $wpdb->posts.ID AND metax.meta_key = 'myPosts_displayed')"; if ($mam_global_join) $join .= " $mam_global_join"; return $join; } add_filter('posts_join','mam_posts_join'); $args = array( 'meta_key' => 'myPosts_order', 'orderby' => 'meta_value_num', 'order' => 'ASC' ); query_posts( $args );Thanks again for your help!
Nothing is printed. Do I need to put something in functions.php or it is ok before the loop?
This is strange beacuse when I put…
$args = array( 'meta_key' => 'myPosts_displayed' ); query_posts( $args );..it’s work well. Except that this time I don’t have the order. So the meta_key is working.
I’ll continue searching and I’ll post soon as I find something.
Thanks for your helpIt almost worked. The order work but all the posts show. It seems that the filter for the displayed posts is’t working.
Thanks for your help Any other ideas ?
Viewing 5 replies - 1 through 5 (of 5 total)