Archived topic
Add time (or time ago) to date in query loop
4 replies · Started by Niek on July 30, 2022
Hi there,
Im trying to get the time, or even better yet, the time ago added to the date field in the query loop of elements.
I see no option anywhere.
Is there a way to achieve this? Maybe by editing functions.php?
It seems it takes the date from settings -> general, so that is fixed.
Would be nice if someone knows how to format it like xx minutes/hours/days ago
Hi there,
thats the correct, as GP / GB will use the get_the_date function to display dates.
That function can be filtered to display the Time Ago - see Toms reply here:
https://generatepress.com/forums/topic/display-time-ago/#post-452639
Thanks! Ill manage with that!
Glad to be of help