search template – meta_query
-
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?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘search template – meta_query’ is closed to new replies.