Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-28T04:08:26.373Z
Answers.Text: I needed to add `elements` in the above query for it to work (Craft 3). `order('elements.dateUpdated desc')`
Answers.UserDisplayName: Gareth
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-16T08:09:56.290Z
Answers.LastActivityDate: 2014-06-27T16:24:52.063Z
Answers.LastEditDate: 2014-06-27T16:24:52.063Z
Answers.UserDisplayName: Ben Croker
Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-04T17:01:39.677Z
Answers.LastActivityDate: 2015-08-04T17:01:39.677Z
Answers.UserDisplayName: Jordan Lev
Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-05T17:13:56.870Z
Answers.Text: I’ve also released an open source plugin to generate sitemaps. https://github.com/joshuabaker/craft-sitemap
Answers.UserDisplayName: Joshua Baker
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-13T19:07:20.980Z
Answers.LastActivityDate: 2014-06-17T19:27:09.830Z
Answers.LastEditDate: 2014-06-17T19:27:09.830Z
Answers.UserDisplayName: Victor
Body: <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>
  
Tags: <entries><structure>
Title: How would I list all entries regardless of section or structure?
ThreadText: # 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](http://www.putyourlightson.net/craft-cms-plugins) (I really like it)
  
  > **Comments:**
  > **username_5**: I’ve also released an open source plugin to generate sitemaps. https://github.com/username_5/craft-sitemap  
  
  ---
  
  ### Answer by username_1 on 2014-06-16. Score: 2
  
  This should output what you want:
  
  ```twig
  {% 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](http://www.putyourlightson.net/craft-cms-plugins).
  
  > **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>
  
  
  ---
  
  