Hi,
I am putting together a search.php template.
When I try to query_posts with inclusion of meta_query, it doesn’t seem to catch.
$args = array(
"post_type" => "featured-work",
"posts_per_page" => "-1",
'meta_query' => array(
array(
'key' => '_fwork_projectclient'
)
)
);
$myQuery = new WP_Query($args);
if ($myQuery->have_posts()) :
while ($myQuery->have_posts()) : $myQuery->the_post();
echo the_title();
endwhile; else:
endif;
I’ve tried this same query on a custom page template and it works as expected.. Any reason for this seemingly odd behavior?