CMB2 Attached Posts – Using field in WP_Query 'meta_query'
-
Hi,
Apologies if I should be asking this question elsewhere.
Is it possible to compare the attached posts field in a meta_query arg? I can’t get this to work for the life of me.
e.g:
$args=array( 'post_type' => 'bst_testimonial', 'orderby' => 'rand', 'posts_per_page' => 10, 'meta_query' => array( array ( 'key' => '_test_cmb_attached_posts', 'value' => $this_ID, 'compare' => 'IN' ) ), ); $test_query = new WP_Query($args);
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘CMB2 Attached Posts – Using field in WP_Query 'meta_query'’ is closed to new replies.