Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Bill Erickson

    (@billerickson)

    I haven’t tried it, but this might work:

    [display-posts category=”forex-2+reviews”]

    Glad I found this post. I was just looking for the same thing. However, it doesn’t seem to work (at least not how I was hoping it would) as it will return posts with either one of the given categories, and not just those with both. At the moment I’m having to create long, descriptive categories.

    It would be great to see some boolean operators to help filter results further. This would make an already great plugin much more powerful.

    Plugin Author Bill Erickson

    (@billerickson)

    I thought the + was a shorthand for boolean operators in WordPress, but I guess not.

    Boolean operators are supported, it’s just a little more complicated:

    [display-posts taxonomy=”category” tax_term=”forex-2, reviews” tax_operator=”AND”]

    You can even do the intersections or additions of multiple taxonomies. Let’s say you want posts in the “forex-2” AND “reviews” category, AND it should be tagged “featured” AND “home”.

    [display-posts taxonomy=”category” tax_term=”forex-2, reviews” tax_operator=”AND” taxonomy_2=”post_tag” tax_2_term=”featured, home” tax_2_operator=”AND” tax_relation=”AND”]

    For more information, see the Multiple Taxonomy Queries section of the wiki.

    That’s fantastic. Thanks a lot Bill.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Posts in two categories’ is closed to new replies.