• Resolved Konadi

    (@konadi)


    Edit: changed title to be more precise

    I have two different types of categories: artists, and media. Each of my posts has at least one category of each type.

    My categories are for example:
    Alice, Bob, Charlie, Movie, Text, Audio.

    And posts would have categories like:
    “alice, bob, audio” or “bob, movie, audio”.

    Now for example I want to list all posts that deal with “Audio” created by “Bob”.

    But then using category=”audio, bob” I get a list of all posts that have either “bob” OR “audio” as categories. What I want however is a list of posts where the categorie is “bob” AND “audio”.

    How can I do this?

    Thank you

    https://www.ads-software.com/plugins/display-posts-shortcode/

Viewing 1 replies (of 1 total)
  • You could try:
    [display-posts taxonomy="category" tax_term="audio, bob" tax_operator="AND"]

    All the best,
    Frank

Viewing 1 replies (of 1 total)
  • The topic ‘How to only list posts that are in category "a" AND category "b"?’ is closed to new replies.