I have a widget that gets posts from different post_type's. I want to exclude some posts that have a custom field value
e.g. I save a form where a checkbox adds a value of 0 or 1 depending if ticked. If the value is 0 the post should be visable and if the value is 1 then it should not be visable.
Here is what I have to extract the posts:
$wpcust = new WP_Query( array( 'post_type' => array( 'posts_type_1', 'posts_type_2' ), 'showposts' => '4' ) );
This is a basic WP_Query that selects posts based on two post_types.
What I want to add is:
'meta_key' => 'key', 'meta_value' => 'value'
Where value is 0 or 1. If I do this it only shows posts based on the meta_value. I need it the other way around where this excludes those posts.
Any help? Thnx