Title: query posts with multiple meta_values?
Last modified: August 19, 2016

---

# query posts with multiple meta_values?

 *  [peiledoir](https://wordpress.org/support/users/peiledoir/)
 * (@peiledoir)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/query-posts-with-multiple-meta_values/)
 * Hey guys, Ill explain this as simple as possible:
 * I want to query posts from wp_posts that are from category 3 and have 2 specific
   meta_keys (Area, Activity).
 * I have tried most of the documentation, but need to figure out how to get multiple
   meta_values. Anytime I have used arrays for the meta_value it only picks up on
   the first one. So lets say I wanted to query Golf in Chicago:
 *     ```
       query_posts( 'cat=3&meta_value=Chicago,Golf' );
       while (have_posts()) : the_post();
       	the_title();
       endwhile;
       ```
   
 * OR
 *     ```
       $args['meta_value'] = array( 'Chicago', 'Golf' );
       query_posts( &args );
       ```
   
 * All these do is list all of the Chicago activities.
    Anyone any ideas??? Im very
   stuck and under some time constraints with it.
 * Thanks

Viewing 1 replies (of 1 total)

 *  Thread Starter [peiledoir](https://wordpress.org/support/users/peiledoir/)
 * (@peiledoir)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/query-posts-with-multiple-meta_values/#post-2053996)
 * Found the answer!!
    [http://www.mattvarone.com/wordpress/query-multiple-meta-values/](http://www.mattvarone.com/wordpress/query-multiple-meta-values/)

Viewing 1 replies (of 1 total)

The topic ‘query posts with multiple meta_values?’ is closed to new replies.

## Tags

 * [meta_keys](https://wordpress.org/support/topic-tag/meta_keys/)
 * [wp_posts](https://wordpress.org/support/topic-tag/wp_posts/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 1 participant
 * Last reply from: [peiledoir](https://wordpress.org/support/users/peiledoir/)
 * Last activity: [14 years, 11 months ago](https://wordpress.org/support/topic/query-posts-with-multiple-meta_values/#post-2053996)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
