[Resolved] Add time (or time ago) to date in query loop

Home Forums Support [Resolved] Add time (or time ago) to date in query loop

Home Forums Support Add time (or time ago) to date in query loop

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2297887
    Niek

    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?

    #2297913
    Niek

    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

    #2297972
    David
    Staff
    Customer Support

    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

    #2297973
    Niek

    Thanks! Ill manage with that!

    #2297993
    David
    Staff
    Customer Support

    Glad to be of help

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.