• 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.