<p>According to the Craft docs, the <a href="https://craftcms.com/docs/templating/craft.entries#section" rel="nofollow noreferrer">section parameter</a> takes a "section handle, an array of section handles, or a SectionModel object". So this should work:</p>

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

{% for entry in entries %}
    {{ entry.title }}
{% endfor %}
</code></pre>

CC BY-SA 3.0
2017-10-15T06:48:27.710Z
got it, i was forgetting the brackets. thanks :)
Dave Joyce
CC BY-SA 3.0
2017-10-14T01:15:34.267Z
2017-10-14T01:15:34.267Z
Jake Dohm
<p>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.</p>

<pre><code>{exp:channel:entries channel="press|in-the-press" orderby="date" dynamic="no" limit="10"}
</code></pre>

<entries><loop>
How do I loop through two sections as one set
# How do I loop through two sections as one set

(Asked by: username_0 on 2017-10-14)

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"}

**Tags:** entries, loop

---

## 1 answers

### Answer by username_1 on 2017-10-14. Score: 3 | Accepted answer

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 %}

> **Comments:**
> **username_0**: got it, i was forgetting the brackets. thanks :)  

---

