More meta values in filtering posts
-
I am filtering posts that have only Sports Cars as mate value. However I need to add one more filter: meta key “active” to “yes”. How can I combine both filters in the same script?
<?php $args=array( 'post_type' => 'page', 'post_status' => 'publish', 'caller_get_posts'=>1, 'meta_key' => 'car_class', 'meta_value' => 'Sports Cars', 'order'=>'ASC', 'orderby'=>'title', 'sort_column' => 'post_modified', ); $my_query = new WP_Query($args); if( $my_query->have_posts() ) { while ($my_query->have_posts()) : $my_query->the_post(); ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘More meta values in filtering posts’ is closed to new replies.