<p>Default limit is 100, try adding <code>.limit(null)</code> to the query </p>

CC BY-SA 3.0
2015-10-21T18:16:02.450Z
2015-10-21T18:16:02.450Z
megatrond
<p>Running into a strange issue with the XML sitemap on our site that I'm hoping for help with. Here is example code for the blog section of our site in our sitemap: </p>

<pre><code>{% set blogPosts = craft.entries.find({ section: 'blogPosts'}) %}

{% for entry in blogPosts %}
    &lt;url&gt;
        &lt;loc&gt;{{ filteredUrl(entry.url) }}&lt;/loc&gt;
        &lt;lastmod&gt;{{ entry.dateUpdated.w3c() }}&lt;/lastmod&gt;
        &lt;changefreq&gt;{{ changeFreq }}&lt;/changefreq&gt;
        &lt;priority&gt;1&lt;/priority&gt;
    &lt;/url&gt;
{% endfor %}
</code></pre>

<p>For context, I believe that the sitemap template was built in roughly early December of last year as part of our site redesign. At the time we had yet to import a variety of older posts from our old website blog, but did so after the sitemap had been coded.</p>

<p>I'd like our sitemap to show those old posts created before the early December timeframe but, unless I change the "post date" to be after Dec 2014, the post will not appear. This is true even if I make a modification to the page, thus changing the dateUpdated field (which populates <code>&lt;lastmod&gt;</code>). If I change the post date of an old post to 2015, it will appear on the sitemap (with <code>&lt;lastmod&gt;</code> showing the current date), but if I change it back to 2014, it disappears. </p>

<p>There's no code that I can see in the template that sets a required post date timeframe for appearing on the sitemap.</p>

<p>What can I do to fix this issue?</p>

<p>Thanks!</p>

<templating><seo><xml>
Old Posts Not Appearing in XML Sitemap
# Old Posts Not Appearing in XML Sitemap

(Asked by: username_0 on 2015-10-21)

Running into a strange issue with the XML sitemap on our site that I'm hoping for help with. Here is example code for the blog section of our site in our sitemap: 
{% set blogPosts = craft.entries.find({ section: 'blogPosts'}) %}

{% for entry in blogPosts %}
    
        {{ filteredUrl(entry.url) }}
        {{ entry.dateUpdated.w3c() }}
        {{ changeFreq }}
        1
    
{% endfor %}

For context, I believe that the sitemap template was built in roughly early December of last year as part of our site redesign. At the time we had yet to import a variety of older posts from our old website blog, but did so after the sitemap had been coded.
I'd like our sitemap to show those old posts created before the early December timeframe but, unless I change the "post date" to be after Dec 2014, the post will not appear. This is true even if I make a modification to the page, thus changing the dateUpdated field (which populates ). If I change the post date of an old post to 2015, it will appear on the sitemap (with  showing the current date), but if I change it back to 2014, it disappears. 
There's no code that I can see in the template that sets a required post date timeframe for appearing on the sitemap.
What can I do to fix this issue?
Thanks!

**Tags:** templating, seo, xml


---

## 1 answers

### Answer by username_1 on 2015-10-21. Score: 4 | Accepted answer

Default limit is 100, try adding `.limit(null)` to the query


---

