WordPress.org

Forums

How to apply with exclusive OR on get_posts (3 posts)

  1. yokima
    Member
    Posted 8 years ago #

    So it's possible to use an inclusive OR in get_posts as following, which will show all posts in category 1 or 2.

    <?php $posts = get_posts('numberposts=10&category=1,2');
    foreach($posts as $post) : ?>
    LOOP
    <?php endforeach; ?>

    How do you show posts that are in BOTH categories 1 and 2?

  2. yokima
    Member
    Posted 8 years ago #

    *bump*

  3. yokima
    Member
    Posted 8 years ago #

    *bump*

Topic Closed

This topic has been closed to new replies.

About this Topic