Answers.Body: <p>If you explicitly need <strong>only</strong> the entries at level 3, and those at level 1, I think combining two queries works best:</p>
  
  <pre><code>{# Get ids for all entries from the different structures and levels #}
  {% set entriesAtLevelThree = craft.entries.section('level-3-section').level(3).limit(6).ids() %}
  {% set entriesAtLevelOne = craft.entries.section(['level-1-section-1', 'level-1-section-2']).level(1).limit(6).ids() %}
  
  {# Combine those IDs #}
  {% set entryIdsCombined = entriesAtLevelThree | merge(entriesAtLevelOne) %}
  
  {# Get all entries (so, no IDs this time), using your IDs #}
  {% set allEntries = craft.entries.id(entryIdsCombined).limit(6).order('postDate DESC') %}
  
  {% for entry in allEntries %}
      {# do your thing #}
  {% endfor %}
  </code></pre>
  
  <p>You can, of course, cache this by wrapping it in <code>{% cache %}</code> tags.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-06T09:53:47.933Z
Answers.Text: You should add `.limit(6)` to the first queries as well, otherwise the `entryIdsCombined` array could be very large.
Answers.UserDisplayName: gromgull
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-06T09:54:19.620Z
Answers.Text: Good point. Will do.
Answers.UserDisplayName: Paul
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-06T09:51:31.950Z
Answers.LastActivityDate: 2015-03-06T09:51:31.950Z
Answers.UserDisplayName: Paul
Body: <p>I need to loop through the 6 latest entries from 3 different structures. The problem is, the entries are located on different levels. One of the structures has entries on level 3, and the other two has entries on level 1.</p>
  
Tags: <structure>
Title: Getting entries from different structures and level
ThreadText: # Getting entries from different structures and level
  
  (Asked by: username_0 on 2015-03-06)
  
  I need to loop through the 6 latest entries from 3 different structures. The problem is, the entries are located on different levels. One of the structures has entries on level 3, and the other two has entries on level 1.
  
  **Tags:** structure
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-03-06. Score: 5 | Accepted answer
  
  If you explicitly need **only** the entries at level 3, and those at level 1, I think combining two queries works best:
  
  ```
  {# Get ids for all entries from the different structures and levels #}
  {% set entriesAtLevelThree = craft.entries.section('level-3-section').level(3).limit(6).ids() %}
  {% set entriesAtLevelOne = craft.entries.section(['level-1-section-1', 'level-1-section-2']).level(1).limit(6).ids() %}
  
  {# Combine those IDs #}
  {% set entryIdsCombined = entriesAtLevelThree | merge(entriesAtLevelOne) %}
  
  {# Get all entries (so, no IDs this time), using your IDs #}
  {% set allEntries = craft.entries.id(entryIdsCombined).limit(6).order('postDate DESC') %}
  
  {% for entry in allEntries %}
      {# do your thing #}
  {% endfor %}
  
  ```
  
  You can, of course, cache this by wrapping it in `{% cache %}` tags.
  
  > **Comments:**
  > **username_2**: You should add `.limit(6)` to the first queries as well, otherwise the `entryIdsCombined` array could be very large.  
  > **username_1**: Good point. Will do.  
  
  ---
  
  