Let's say I have an articles content type, and a field_tags reference field (with multiple values referencing a "tag" vocabulary)

To retrieve articles referencing, say, "tag1" or "tag2", I do this:


That gives me all articles that have either tag1 or tag2.

However, How can I get all articles that have both tag1 and tag2?

2 Answers 2


I have tried as follow


enter image description here

you can see in the screen shot only 1 node filtered which has both 5 & 6 term id.

  • Thanks for the reply! When I try this it only returns nodes that have the last value in the filter. So, in your example I think this would only return nodes which have the term id of 6 . In your test, did you have nodes that had only the term id 6? I think they will be returned with that query.
    – Hubert
    Jan 19, 2022 at 16:29
  • Yes you are right when i added node only with term id 6 that is also filtered.
    – khurrami
    Jan 20, 2022 at 7:15

You can use condition grouping and have like below :




I have not tried that but I think you can even use a code like this:


just notice that in this case two different key is used for conditions

  • Unfortunately that doesn't seem to work. When I try it doesn't return any result.
    – Hubert
    Jan 20, 2022 at 19:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.