How to display elements of different post types?

I am not sure I understand your conditions but I think you want something like this: $arg = array ( ‘post_type’ => array(‘post’,’placas’), ‘orderby’ => ‘rand’, ‘tax_query’ => array( ‘relation’ => ‘OR’, array( ‘taxonomy’ => ‘firmas’, ‘field’ => ‘slug’, ‘terms’ => array( ‘LG’ ), ‘operator’ => ‘NOT IN’, ), array( ‘taxonomy’ => ‘category’, ‘field’ => … Read more

meta_query dates from an array

If you store the meta as a serialized array, you should do meta query like this: $args = array( ‘post_type’ => ‘income’, ‘meta_query’ => array( array( ‘key’ => ‘income_dates’, ‘value’ => “2014-02-01”, ‘compare’ => ‘LIKE’ ), ) );

WP_Query get posts where post_name is empty

You can try this: $args = array ( ‘post_type’ => ‘books’, ‘name’ => ”, ‘post_status’ => array(‘publish, draft’), ‘posts_per_page’ => -1, ‘meta_query’ => array( array( ‘key’ => ‘book_isbn_id’, ‘value’ => ‘dummy’, ‘compare’ => ‘NOT EXISTS’, ‘type’ => ‘NUMERIC’, ), ), ); add_filter( ‘posts_where’, ‘custom_posts_where’ ); $query = new WP_Query( $args ); echo $query->request; where function … Read more