Title: Using WP_Query with multiple conditionals
Last modified: August 20, 2016

---

# Using WP_Query with multiple conditionals

 *  [danblee](https://wordpress.org/support/users/danblee/)
 * (@danblee)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/using-wp_query-with-multiple-conditionals/)
 * Hey There,
 * I’d like to create a list of post titles. The posts need to be part of a category
   called “Job Openings” and a custom field called position_status needs to be “
   Open”. I know how to generate a list based on the category:
 *     ```
       <ul class="news-list">
         <?php
       $pstatus = get_post_meta($post->ID, 'position_status', true);
       $my_query = new WP_Query('category_name="Job Openings"');
         while ($my_query->have_posts()) : $my_query->the_post();
         $do_not_duplicate = $post->ID; ?>
           <li><?php the_title(); ?> <a href="<?php the_permalink(); ?>">Read More &raquo;</a></li>
         <?php endwhile; ?>
       </ul>
       ```
   
 * That will display everything in the category “Job Openings” in a nice list just
   fine but I’m not sure how to filter that query so the custom field position_status
   is set to “Open”.
 * Any ideas? Thanks in advance!

The topic ‘Using WP_Query with multiple conditionals’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [danblee](https://wordpress.org/support/users/danblee/)
 * Last activity: [14 years, 11 months ago](https://wordpress.org/support/topic/using-wp_query-with-multiple-conditionals/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
