Answers.Body: <p>You can add it like every other criteria property</p>
  
  <pre><code>craft.entries.date('&gt;' ~ now|date_modify('-1 day')|atom) 
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-01T13:09:04.347Z
Answers.LastActivityDate: 2018-11-01T13:09:04.347Z
Answers.UserDisplayName: Robin Schambach
Body: <p>How can I incorporate the date_modify into the craft.entries query so that the pagination takes into account this criteria? At the moment the limit is also accounting for past entries and I'm hitting errors whatever I try.</p>
  
  <pre><code>{% paginate craft.entries.section('events').limit(10).order('date asc') as entries %}
  
      {% for entry in entries if entry.date &gt; now|date_modify('-1 day')  %}
  
          ...
  
      {% endfor %}
  
  
      {% include "includes/_pagination" %}
  </code></pre>
  
Tags: <datetime><pagination>
Title: Pagination with if statement date modify
ThreadText: # Pagination with if statement date modify
  
  (Asked by: username_0 on 2018-11-01)
  
  How can I incorporate the date\_modify into the craft.entries query so that the pagination takes into account this criteria? At the moment the limit is also accounting for past entries and I'm hitting errors whatever I try.
  
  ```
  {% paginate craft.entries.section('events').limit(10).order('date asc') as entries %}
  
      {% for entry in entries if entry.date > now|date_modify('-1 day')  %}
  
          ...
  
      {% endfor %}
  
      {% include "includes/_pagination" %}
  
  ```
  
  **Tags:** datetime, pagination
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-11-01. Score: 1 | Accepted answer
  
  You can add it like every other criteria property
  
  ```
  craft.entries.date('>' ~ now|date_modify('-1 day')|atom) 
  
  ```
  
  
  ---
  
  