1

I'm trying to loop through two separate channels, but combined together. And then just check which channel the entry belongs to in the loop to display it correctly. This is how I had it done in EE, but I can't seem to find a way with Craft.

{exp:channel:entries channel="press|in-the-press" orderby="date" dynamic="no" limit="10"}
3

According to the Craft docs, the section parameter takes a "section handle, an array of section handles, or a SectionModel object". So this should work:

{% set entries = craft.entries.section(['press', 'in-the-press']).limit(10) %}

{% for entry in entries %}
    {{ entry.title }}
{% endfor %}
| improve this answer | |
  • got it, i was forgetting the brackets. thanks :) – Dave Joyce Oct 15 '17 at 6:48

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.