• Resolved wifiman01

    (@wifiman01)


    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>“><?php the_title(); ?></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)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Multiple values’ is closed to new replies.