If I remove the meta_query portion of the $args (see below), I get all the post.
$args = array( 'numberposts' => -1, 'post_type' => 'listing', ); $agentsListings = new WP_Query( $args );
But this won’t work because I need to pull the posts per agent (something like code below). I am doing some something wrong with the meta_query portion of my query. Please help!
$args = array( 'numberposts' => -1, 'post_type' => 'listing', 'meta_query' => array( array( 'key' => 'your_agent', 'value' => '"' . $post->ID . '"', 'compare' => 'LIKE' ) ) ); $agentsListings = new WP_Query( $args );
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!