Hi guys,
I would like to filter the main $wp_query to exclude posts with a specific meta_key value. But my $wp_query return nothing when I add these parameters where it works smoothly without ‘meta_key’ and ‘meta_value’.
Any advise on how I could fix that?
Thanks in advance for your time.
J.
<?php
global $wp_query;
$args = array_merge( $wp_query->query_vars, array( 'posts_per_page' => 15,<strong>'meta_key' => 'collaborator', 'meta_value' => 'yes' </strong>) );
query_posts( $args );
?>
'meta_query' => array( array('key' => 'collaborator','value' => 'no','compare' => '='))
Stupid me ! I solved it like that…
Thanks for posting your solution!