How to query multiple meta values under one meta key
-
I’m currently trying to query multiple meta_values under one meta_key – rating.
At present my query is the following:
<?php $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); $wp_query->query('cat=18,42&meta_key=rating&meta_value=8&9&10'.'&paged='.$paged); ?>
This only shows items with a meta_value of 8 though, not 8, 9, and 10 as I want it to. I’ve tried separating the values with commas however that doesn’t do anything either. Does anyone have any advice?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘How to query multiple meta values under one meta key’ is closed to new replies.