Title: group posts with the same date
Last modified: August 18, 2016

---

# group posts with the same date

 *  [ptryk](https://wordpress.org/support/users/ptryk/)
 * (@ptryk)
 * [20 years, 6 months ago](https://wordpress.org/support/topic/group-posts-with-the-same-date/)
 * I am having a little trouble with the loop.. at least that is where I think my
   trouble lies. In short, I want to group posts that are of the same date. I figured
   it would be easy.. but, i can’t seem to get it to work.
 * ascii-graphically, this is basically what i want to do:
    |————————| |x date 1
   |x |x|…………………|| |x|time (post 1) |x| |x| |x|…………………|| |x |x|…………………|| |x|time(
   post 2) |x| |x| |x|…………………|| |————————| |————————| |x date 2 |x |x|…………………|| 
   |x|time (post 1) |x| |x| |x|…………………|| |————————|
 * where the “x”‘s make up a (hopefuly!?) a single block element ~20px wide.. the
   problem as I see it is that there is no way to know how big it needs to be in
   the begining of the loop (assumed that is where it would need to be placed)!?
 * I have tried a number of different approaches, but they have ended in failure.:
   S
 * Is there anyone who has done this who could give me some kindly nudges in the
   right direction?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [20 years, 6 months ago](https://wordpress.org/support/topic/group-posts-with-the-same-date/#post-297207)
 * I am not sure I understand what exactly do you want. What the “x” would be visually?
   
   As for “grouping” – check out the Classic theme: it shows the date once for all
   the posts made on the same day, and you could twaek it to have the time shown
   for every post. Even semantically it is consistent: the date is in a h2 tag and
   the titles have a h3 tag.
 *  Thread Starter [ptryk](https://wordpress.org/support/users/ptryk/)
 * (@ptryk)
 * [20 years, 6 months ago](https://wordpress.org/support/topic/group-posts-with-the-same-date/#post-297239)
 * I will check out the classic theme.. thanks for the tip!
 * to explain theh x’s.. they are meant to signify a two single a bars/rectangles
   about 20px wide and as long as needed to cover the posts from a single day.
 *  Thread Starter [ptryk](https://wordpress.org/support/users/ptryk/)
 * (@ptryk)
 * [20 years, 6 months ago](https://wordpress.org/support/topic/group-posts-with-the-same-date/#post-297255)
 * I have checked the classic, it doesn’t hold what I am after.. what I am really
   after is some special formatting/layout.
 * for more clarification, as I realize my ascii-graphics are less than expanitory..
   and my explanation is probably just more confusing.. sorry. 😛
 * I am trying to code in the turquois blocks elements to the left as shown here:
 * [http://img509.imageshack.us/img509/701/lyt6cf.jpg](http://img509.imageshack.us/img509/701/lyt6cf.jpg)
 * I thought that this *should* be easy.. but I am struggling.
 * the only strategy I have come up with so far is to add a block to the left of
   each post area, but I need either a way of knowing how many posts there are for
   each day or to know when I have come to the last post of the day to fix the specific
   formatting I want at the bottom. .. the only way I know how to do that is to 
   run the loop twice, once just to get the values I need. but I just feel there
   has got to be an easier way that I am simply not seeing?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘group posts with the same date’ is closed to new replies.

## Tags

 * [loop](https://wordpress.org/support/topic-tag/loop/)

 * 3 replies
 * 2 participants
 * Last reply from: [ptryk](https://wordpress.org/support/users/ptryk/)
 * Last activity: [20 years, 6 months ago](https://wordpress.org/support/topic/group-posts-with-the-same-date/#post-297255)
 * Status: not a support question

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
