Support » How-To and Troubleshooting » [Resolved] search template – meta_query
4 years, 9 months ago
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(
'key' => '_fwork_projectclient'
$myQuery = new WP_Query($args);
if ($myQuery->have_posts()) :
while ($myQuery->have_posts()) : $myQuery->the_post();
I’ve tried this same query on a custom page template and it works as expected.. Any reason for this seemingly odd behavior?
Hi, it turns out there was conflicting function causing the issue in my functions.php file.