Answers.Body: <p>Something like this may work for you (untested).</p>
  
  <pre><code>{% set categories = craft.categories.group('myCategoryGroup').find %}
  {% set tags = craft.tags.group('myTagGroup').find %}
  {% set elements = categories|merge(tags) %}
  &lt;ul&gt;
      {% for element in elements %}
          &lt;li&gt;{{ element.title }}&lt;/li&gt;
      {% endfor %}
  &lt;/ul&gt;
  </code></pre>
  
  <p>Sorting them alphabetically is a little more difficult. For that you may want to try twig's <a href="http://twig.sensiolabs.org/doc/filters/sort.html" rel="nofollow">sort filter</a> or, failing that, the <a href="http://michaelrog.com/craft/supersort" rel="nofollow">supersort</a> or <a href="https://github.com/victor-in/Craft-TwigBetterSort" rel="nofollow">craft-twig-better-sort</a> plugins.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-21T18:47:49.223Z
Answers.LastActivityDate: 2015-10-21T18:47:49.223Z
Answers.UserDisplayName: Douglas McDonald
Body: <p>Is is possible to loop through both a category group and tag group in a for loop?</p>
  
  <p>Categories: blue, red, orange
  Tags: basketball</p>
  
  <p>Loop displays: basketball, blue, orange, red.</p>
  
Tags: <loop>
Title: Loop through both category group and tag group in single loop
ThreadText: # Loop through both category group and tag group in single loop
  
  (Asked by: username_0 on 2015-10-21)
  
  Is is possible to loop through both a category group and tag group in a for loop?
  
  Categories: blue, red, orange
  Tags: basketball
  
  Loop displays: basketball, blue, orange, red.
  
  **Tags:** loop
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-10-21. Score: 2 | Accepted answer
  
  Something like this may work for you (untested).
  
  ```
  {% set categories = craft.categories.group('myCategoryGroup').find %}
  {% set tags = craft.tags.group('myTagGroup').find %}
  {% set elements = categories|merge(tags) %}
  <ul>
      {% for element in elements %}
          <li>{{ element.title }}</li>
      {% endfor %}
  </ul>
  
  ```
  
  Sorting them alphabetically is a little more difficult. For that you may want to try twig's [sort filter](http://twig.sensiolabs.org/doc/filters/sort.html) or, failing that, the [supersort](http://michaelrog.com/craft/supersort) or [craft-twig-better-sort](https://github.com/victor-in/Craft-TwigBetterSort) plugins.
  
  
  ---
  
  