WordPress.org

Ready to get started?Download WordPress

Forums

How to query with multiple category__and's? (2 posts)

  1. TruthMedia
    Member
    Posted 3 years ago #

    Can anyone tell me how to run a query to include results from a set of categories, keeping one of the categories required?

    Something like: get posts in category's 1 and 3, or categories 1 and 4.

    I know I can use category__and = array(1,3), but can I do something like category__and = array( array(1,3), array(1,4) );

    Thanks in advance,
    James.

  2. Error601
    Member
    Posted 2 years ago #

    Does anyone have a solution for this? I'm racking my brain trying to figure it out.

    I'm trying to do the same exact thing -- query 2 sets of categorry__and combos and display the posts for those.

    Any help would be appreciated.

Topic Closed

This topic has been closed to new replies.

About this Topic