WordPress.org

Ready to get started?Download WordPress

Forums

Category filtering (3 posts)

  1. Aen
    Member
    Posted 7 years ago #

    How do I set it up such that I only display a specified number of posts that must exist in 2 specified categories. Like an AND rather than an OR.

    This one will display posts as long as it's in either category 4 or 7
    <?php query_posts('cat=4,7&showposts=1'); ?>

    But I only want to display posts if it's in both of these categories.

  2. Aen
    Member
    Posted 7 years ago #

    Bump

  3. jephperro4
    Member
    Posted 6 years ago #

    I am looking for an answer to this question as well.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags