Answers.Body: <p>Pulling it all inside paginate fixed it:</p>
  
  <pre><code>{% paginate craft.entries().section('events').limit(2).order('startDate asc') as events %}
  
  {% for event in events %}
      // Event content
  {% endfor %}
  
  {% if paginate.prevUrl %}&lt;a href="{{ paginate.prevUrl }}"&gt;Previous Page&lt;/a&gt;{% endif %}
  {% if paginate.nextUrl %}&lt;a href="{{ paginate.nextUrl }}"&gt;Next Page&lt;/a&gt;{% endif %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-08T22:34:10.767Z
Answers.LastActivityDate: 2019-05-08T22:34:10.767Z
Answers.UserDisplayName: Bryce
Body: <p>I'm trying to paginate a bunch of events based on their start date. The order part is working correctly, but each consecutive page just loads the exact same entries. My code:</p>
  
  <pre><code>{% set events = craft.entries().section('events').limit(2).order('startDate asc') %}
  {% paginate events as pageInfo, pageEntries %}
  
  {% for event in events %}
      // Event content
  {% endfor %}
  
  {% if pageInfo.prevUrl %}&lt;a href="{{ pageInfo.prevUrl }}"&gt;Previous Page&lt;/a&gt;{% endif %}
  {% if pageInfo.nextUrl %}&lt;a href="{{ pageInfo.nextUrl }}"&gt;Next Page&lt;/a&gt;{% endif %}
  </code></pre>
  
  <p>What am I missing?</p>
  
Tags: <craft3><pagination><query>
Title: Paginate entries ordered by a custom date field
ThreadText: # Paginate entries ordered by a custom date field
  
  (Asked by: username_0 on 2019-05-08)
  
  I'm trying to paginate a bunch of events based on their start date. The order part is working correctly, but each consecutive page just loads the exact same entries. My code:
  
  ```
  {% set events = craft.entries().section('events').limit(2).order('startDate asc') %}
  {% paginate events as pageInfo, pageEntries %}
  
  {% for event in events %}
      // Event content
  {% endfor %}
  
  {% if pageInfo.prevUrl %}<a href="{{ pageInfo.prevUrl }}">Previous Page</a>{% endif %}
  {% if pageInfo.nextUrl %}<a href="{{ pageInfo.nextUrl }}">Next Page</a>{% endif %}
  
  ```
  
  What am I missing?
  
  **Tags:** craft3, pagination, query
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2019-05-08. Score: 2
  
  Pulling it all inside paginate fixed it:
  
  ```
  {% paginate craft.entries().section('events').limit(2).order('startDate asc') as events %}
  
  {% for event in events %}
      // Event content
  {% endfor %}
  
  {% if paginate.prevUrl %}<a href="{{ paginate.prevUrl }}">Previous Page</a>{% endif %}
  {% if paginate.nextUrl %}<a href="{{ paginate.nextUrl }}">Next Page</a>{% endif %}
  
  ```
  
  
  ---
  
  