Answers.Body: <p>This seems like a good use case for Craft's <code>group</code> filter. I'd recommend reading <a href="https://craftcms.com/support/entry-archive" rel="nofollow noreferrer">this page</a> to get a better understanding of how it's used. </p>
  
  <p>Not quite sure what your code looks like but I'll pull this from the above mentioned support article for explanation purposes: </p>
  
  <pre><code>{% set allEntries = craft.entries.section('blog').limit(null) %}
  
  {% for month, entries in allEntries | group("postDate|date('F')") %}
      &lt;h3&gt;{{ month }}&lt;/h3&gt;
      &lt;ul&gt;
          {% for entry in entries %}
              &lt;li&gt;{{ entry.getLink() }}&lt;/li&gt;
          {% endfor %}
      &lt;/ul&gt;
  {% endfor %}
  </code></pre>
  
  <p>So obviously you'd need to adapt this code to your setup, for example, switch out the month grouping for a per-day grouping. Then what I would do is wrap it in a conditional that only works if the postDate is more than three days older than today's date. Then you could use a similar query as the above to display the first three sections individually, (i.e. one for "Today", one for "Yesterday", and one for the day of the week of the third day).</p>
  
  <p>Might not be the best way (curious to see any other answers that might show up), but just the first thought that came to mind from a quick perusal of your question.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-03T08:48:45.570Z
Answers.Text: Hi Jalen, thanks very much for the help! It's definitely the way I was thinking but having numerous code snippets for multiple days seems a bit clunky? I may have a dig around and see what I can do
Answers.UserDisplayName: JMKelley
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-03T12:27:47.337Z
Answers.Text: Yeah I guess it sounds a bit clunky. If you do go this route, I would recommend maybe eager-loading your entries to improve performance and reduce the number of database queries.
Answers.UserDisplayName: Jalen Davenport
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-03T01:12:42.997Z
Answers.LastActivityDate: 2018-04-03T01:12:42.997Z
Answers.UserDisplayName: Jalen Davenport
Body: <p>I've been looking around at numerous posts but can't seem to find a solution that works without constant work arounds. I'm looking to show posts split by days they were posted similar to www.producthunt.com</p>
  
  <p>Today, Yesterday -> Sunday. Then displaying the date posted e.g. 31st March from then on.</p>
  
  <p>Different to most questions as this is showing live posts set out by different worded days instead of numerical. I can't seem to find a way of doing this without repeating the same code block for 7 days then a generic by date loop?</p>
  
  <p>Is this possible in Craft?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-03T00:38:43.243Z
Comments.Text: Possible duplicate of [How to show entries which are live between dates regardless of postdate or expiry dates?](https://craftcms.stackexchange.com/questions/8992/how-to-show-entries-which-are-live-between-dates-regardless-of-postdate-or-expir) see how to calculate time https://stackoverflow.com/questions/10197900/given-a-unix-timestamp-how-to-get-beginning-and-end-of-that-day
Comments.UserDisplayName: Robin Schambach
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-03T08:51:51.293Z
Comments.Text: Hey Robin! It's a bit different as that's just looking for a numerical loop rather than one by worded day :) I've edited the question to be more targeted.
Comments.UserDisplayName: JMKelley
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-03T08:56:28.737Z
Comments.Text: Alright, I've removed the vote for closing. Otherwise your solution would be exactly that: loop through the days / date distances and use the method provided in the link. You don't need the same block 7 times, you can create a loop for it
Comments.UserDisplayName: Robin Schambach
Tags: <templating><entries>
Title: Split posts by days similar to Product hunt
ThreadText: # Split posts by days similar to Product hunt
  
  (Asked by: username_0 on 2018-04-02)
  
  I've been looking around at numerous posts but can't seem to find a solution that works without constant work arounds. I'm looking to show posts split by days they were posted similar to www.producthunt.com
  
  Today, Yesterday -> Sunday. Then displaying the date posted e.g. 31st March from then on.
  
  Different to most questions as this is showing live posts set out by different worded days instead of numerical. I can't seem to find a way of doing this without repeating the same code block for 7 days then a generic by date loop?
  
  Is this possible in Craft?
  
  **Tags:** templating, entries
  
  > **Comments:**
  > **username_1**: Possible duplicate of [How to show entries which are live between dates regardless of postdate or expiry dates?](https://craftcms.stackexchange.com/questions/8992/how-to-show-entries-which-are-live-between-dates-regardless-of-postdate-or-expir) see how to calculate time https://stackoverflow.com/questions/10197900/given-a-unix-timestamp-how-to-get-beginning-and-end-of-that-day  
  > **username_0**: Hey username_1! It's a bit different as that's just looking for a numerical loop rather than one by worded day :) I've edited the question to be more targeted.  
  > **username_1**: Alright, I've removed the vote for closing. Otherwise your solution would be exactly that: loop through the days / date distances and use the method provided in the link. You don't need the same block 7 times, you can create a loop for it  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2018-04-03. Score: 2 | Accepted answer
  
  This seems like a good use case for Craft's `group` filter. I'd recommend reading [this page](https://craftcms.com/support/entry-archive) to get a better understanding of how it's used.
  
  Not quite sure what your code looks like but I'll pull this from the above mentioned support article for explanation purposes:
  
  ```
  {% set allEntries = craft.entries.section('blog').limit(null) %}
  
  {% for month, entries in allEntries | group("postDate|date('F')") %}
      <h3>{{ month }}</h3>
      <ul>
          {% for entry in entries %}
              <li>{{ entry.getLink() }}</li>
          {% endfor %}
      </ul>
  {% endfor %}
  
  ```
  
  So obviously you'd need to adapt this code to your setup, for example, switch out the month grouping for a per-day grouping. Then what I would do is wrap it in a conditional that only works if the postDate is more than three days older than today's date. Then you could use a similar query as the above to display the first three sections individually, (i.e. one for "Today", one for "Yesterday", and one for the day of the week of the third day).
  
  Might not be the best way (curious to see any other answers that might show up), but just the first thought that came to mind from a quick perusal of your question.
  
  > **Comments:**
  > **username_0**: Hi username_2, thanks very much for the help! It's definitely the way I was thinking but having numerous code snippets for multiple days seems a bit clunky? I may have a dig around and see what I can do  
  > **username_2**: Yeah I guess it sounds a bit clunky. If you do go this route, I would recommend maybe eager-loading your entries to improve performance and reduce the number of database queries.  
  
  ---
  
  