Title: Multiple values
Last modified: August 18, 2016

---

# Multiple values

 *  Resolved [wifiman01](https://wordpress.org/support/users/wifiman01/)
 * (@wifiman01)
 * [19 years, 4 months ago](https://wordpress.org/support/topic/multiple-values/)
 * Hi to all,
 * I have use this code for an include to show several categories except one :
 * <!– ———————————–
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post();?
   >
 *  <!– If the post is in the category we want to exclude, we simply pass to the
   next post. –>
    <?php if (in_category(‘3’)) continue; ?>
 *  <div class=”post”>
 * </h2>
 *  <small><?php the_time(‘F jS, Y’); ?></small>
 *  <div class=”entry”>
    <?php the_content(); ?> </div>
 *  <p class=”postmetadata”>Posted in <?php the_category(‘, ‘); ?></p>
    </div> <!–
   closes the first div box –>
 *  <?php endwhile; else: ?>
    <p>Sorry, no posts matched your criteria.</p> <?php
   endif; ?> –>
 * How can i do at line
 * <!— <?php if (in_category(‘3’)) continue; ?> –>
 * TO select more than one category (e.g here cat 3 and i would like cat ” & 4 for
   example.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [19 years, 4 months ago](https://wordpress.org/support/topic/multiple-values/#post-484677)
 * `<?php if (in_category('3') || in_category('4')) continue; ?>`
 *  Thread Starter [wifiman01](https://wordpress.org/support/users/wifiman01/)
 * (@wifiman01)
 * [19 years, 4 months ago](https://wordpress.org/support/topic/multiple-values/#post-484728)
 * Waaw that work !!! Thank you very much

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Multiple values’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [wifiman01](https://wordpress.org/support/users/wifiman01/)
 * Last activity: [19 years, 4 months ago](https://wordpress.org/support/topic/multiple-values/#post-484728)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
