I have a venue search tool which has two categories - event type and event size. How do I create an entries loop that returns entries that have both categories assigned?

1 Answer 1


Use the relatedTo method and pass an array using the and parameter.

 {% set venueEventType = craft.request.getParam('catVenueEventType') %}
 {% set venueEventSize = craft.request.getParam('catVenueEventSize') %}

 {% set entries = craft.entries.section('venues').relatedTo(['and', venueEventType, venueEventSize]) %}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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