Hi Oli,
Thanks for reaching out.
While using multiple post IDs, you need to use the post__in parameter and array as a value. You need to create an array of arguments for the Query and then just use the http_build_query
function to format it into the Query String .
@bobbybosler , no problem…happy to help. For a little more context on how I got that result, you might find this helpful if you need to create additional complex queries in the future…
First, you’ll need a PHP environment to work in. If you’re developing locally, you can just throw any of this in your child theme’s functions.php file to ultimately get some output to work with. Start by writing out a query using the standard WP_Query syntax like so:
$tax_query[] = array(
'taxo…
Hello Jen,
Your WP Query is not entirely correct. If you follow the detailed explanation of @Kory on this thread (Looper Query String: Featured Products ), you should be having something like this:
$meta_query[] = array(
'key' => 'mec_start_date',
'value' => date('Ymd'),
'compare' => '>=',
);
$tax_query[] = array(
'taxonomy' => 'mec_category',
'terms' => 'take-action',
);
$query = array(
'post_type' => 'mec-events',
'tax_query' => $tax_query,
'meta_ke…
Hope it helps.
Thanks