<p>This should output what you want:</p>

<pre class="lang-twig prettyprint-override"><code>{% for entry in craft.entries.order('dateUpdated desc') %}
    {{ entry.title }}
{% endfor %}
</code></pre>

<p>Although the easiest way to create an xml sitemap is to use the <a href="http://www.putyourlightson.net/craft-cms-plugins" rel="nofollow">Sitemap Plugin</a>.</p>

CC BY-SA 4.0
2018-07-28T04:08:26.373Z
I needed to add `elements` in the above query for it to work (Craft 3). `order('elements.dateUpdated desc')`
Gareth
CC BY-SA 3.0
2014-06-16T08:09:56.290Z
2014-06-27T16:24:52.063Z
2014-06-27T16:24:52.063Z
Ben Croker
<p>In addition to the $49 plugin mentioned in other answers, there's also a more basic one that is free: <a href="https://github.com/xodigital/SimpleSitemap" rel="nofollow">https://github.com/xodigital/SimpleSitemap</a></p>

CC BY-SA 3.0
2015-08-04T17:01:39.677Z
2015-08-04T17:01:39.677Z
Jordan Lev
<p>Actually your code should work just fine. But by default only 100 entries are fetched, maybe you need to increase the limit:</p>

<pre><code>{% set entries = craft.entries.section().limit(null) %}
</code></pre>

<p>But if you just want to create a Sitemap, try <a href="http://www.putyourlightson.net/craft-cms-plugins" rel="noreferrer">Ben Croker's Sitemap-Plugin</a> (I really like it)</p>

CC BY-SA 3.0
2015-08-05T17:13:56.870Z
I’ve also released an open source plugin to generate sitemaps. https://github.com/joshuabaker/craft-sitemap
Joshua Baker
CC BY-SA 3.0
2014-06-13T19:07:20.980Z
2014-06-17T19:27:09.830Z
2014-06-17T19:27:09.830Z
Victor
<p>I'm trying to build and XML site map that sorts all entries by their modification dates with the newly modified first. </p>

<p><code>{% for entry in craft.entries.find() %}</code> ignores the structures,</p>

<p><code>{% for entry in craft.entries.section().find() %}</code> returns the same as above,</p>

<p><code>{% for entry in craft.entries.section('mainPages').find() %}</code> returns the structure as expected.</p>

<p>Looking for a way to include everything in a single, sortable query.</p>

<entries><structure>
How would I list all entries regardless of section or structure?
# How would I list all entries regardless of section or structure?

(Asked by: username_0 on 2014-06-13)

I'm trying to build and XML site map that sorts all entries by their modification dates with the newly modified first.

`{% for entry in craft.entries.find() %}` ignores the structures,

`{% for entry in craft.entries.section().find() %}` returns the same as above,

`{% for entry in craft.entries.section('mainPages').find() %}` returns the structure as expected.

Looking for a way to include everything in a single, sortable query.

**Tags:** entries, structure


---

## 3 answers

### Answer by username_4 on 2014-06-13. Score: 7 | Accepted answer

Actually your code should work just fine. But by default only 100 entries are fetched, maybe you need to increase the limit:
{% set entries = craft.entries.section().limit(null) %}

But if you just want to create a Sitemap, try username_1's Sitemap-Plugin (I really like it)

> **Comments:**
> **username_5**: I’ve also released an open source plugin to generate sitemaps. https://github.com/joshuabaker/craft-sitemap  

---

### Answer by username_1 on 2014-06-16. Score: 2

This should output what you want:
{% for entry in craft.entries.order('dateUpdated desc') %}
    {{ entry.title }}
{% endfor %}

Although the easiest way to create an xml sitemap is to use the Sitemap Plugin.

> **Comments:**
> **username_2**: I needed to add `elements` in the above query for it to work (Craft 3). `order('elements.dateUpdated desc')`  

---

### Answer by username_3 on 2015-08-04. Score: 1

In addition to the $49 plugin mentioned in other answers, there's also a more basic one that is free: <https://github.com/xodigital/SimpleSitemap>


---

