Archived topic
Reorder updated and published dates
3 replies · Started by paddyd on August 10, 2021
I've tried to get this to work, using example: https://generatepress.com/forums/topic/modified-date-after-date-published/
It doesn't work. Dates are still in the wrong order. I tried various other things as well, none successful.
I'd like it to read: Published: July 19, 2021 Updated: August 3, 2021 - for example.
Hi there,
Can you try adding this CSS?
span.posted-on {
display: flex;
}
time.updated {
order: 2;
}
time.entry-date.published {
order: 1;
margin-right: 1em;
}
Here's how to add CSS - https://docs.generatepress.com/article/adding-css/
Tip: Make sure you clear/purge all cache after applying changes so it reflects properly. :D
Thanks, Elvin - works perfectly. I removed the "margin-right: 1em;" from the CSS I already had:
.posted-on .updated {
display: inline-block;
}
(obviously not needed now, with the updated date on the right side)
Nice one. Glad it works for you. No problem. :D