<p>Craft has a default limit of a 100 elements returned via an <a href="https://craftcms.com/docs/templating/elementcriteriamodel" rel="nofollow noreferrer">ElementCriteriaModel</a>. To pull <em>all</em> elements, you'll need to explicitly set <code>limit</code> to <code>null</code>:</p>

<pre><code>{% for post in craft.entries.section('posts').limit(null) %}
    ...
{% endfor %}
</code></pre>

CC BY-SA 3.0
2016-12-09T02:12:56.457Z
2016-12-09T02:12:56.457Z
Mats Mikkel Rummelhoff
<p>I have a for loop for all entries.  There is no limit set, yet the loop is not displaying all the entries.  The missing entries are the oldest.  These missing entries do appear on category specific pages.  </p>

<p>There are no errors.  I have approximately 100 entries.  The for loop is only displaying the most recent 80 or so.  </p>

<p>Any ideas? 
Thanks</p>

<pre><code>{% for post in craft.entries.section('posts') %}
                {% if loop.first and craft.request.pageNum == 1 %}  
                    &lt;div class="box col-sm-4 col-md-6"&gt;
                    &lt;div class="thumb featured dark-overlay"&gt;
                        &lt;div class="photo"&gt;
                            &lt;a href="{{post.url}}"&gt;
                                &lt;img src="{{post.postImage.first().getUrl('featuredImage')}}" alt="" width="715" height="715"&gt;

                                &lt;span class="info"&gt;&lt;strong class="big-title"&gt;{{post.title}}&lt;/strong&gt;&lt;span class="excerpt"&gt;{{post.tagline}}&lt;/span&gt;
                                &lt;em class="arrow-right"&gt;&lt;/em&gt;&lt;/span&gt;
                            &lt;/a&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
                {% else %}
                &lt;div class="box col-xs-6 col-sm-4 col-md-3"&gt;
                    &lt;div class="thumb"&gt;
                        &lt;div class="photo"&gt;
                            &lt;a href="{{post.url}}"&gt;
                                &lt;img src="{{post.postImage.first().getUrl('thumbImage')}}" alt="" width="434" height="434"&gt;
                                &lt;span class="info"&gt;&lt;strong class="title"&gt;{{post.title}}&lt;/strong&gt;
                                    &lt;!--&lt;span class="excerpt"&gt;{{post.tagline}}&lt;/span&gt;--&gt;
                                &lt;em class="arrow-right"&gt;&lt;/em&gt;&lt;/span&gt;
                            &lt;/a&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                &lt;/div&gt;      
                {% endif %}
                {% endfor %}                
</code></pre>

<forloop><limit>
For loop does not display all entries in section
# For loop does not display all entries in section

(Asked by: username_0 on 2016-12-09)

I have a for loop for all entries.  There is no limit set, yet the loop is not displaying all the entries.  The missing entries are the oldest.  These missing entries do appear on category specific pages.  
There are no errors.  I have approximately 100 entries.  The for loop is only displaying the most recent 80 or so.  
Any ideas? 
Thanks
{% for post in craft.entries.section('posts') %}
                {% if loop.first and craft.request.pageNum == 1 %}  
                    
                    
                        
                            
                                

                                {{post.title}}{{post.tagline}}
                                
                            
                        
                    
                
                {% else %}
                
                    
                        
                            
                                
                                {{post.title}}
                                    
                                
                            
                        
                    
                      
                {% endif %}
                {% endfor %}

**Tags:** forloop, limit

---

## 1 answers

### Answer by username_1 on 2016-12-09. Score: 4 | Accepted answer

Craft has a default limit of a 100 elements returned via an ElementCriteriaModel. To pull all elements, you'll need to explicitly set limit to null:
{% for post in craft.entries.section('posts').limit(null) %}
    ...
{% endfor %}


---

