I display a list of my recently posted custom posts. However i would like to display when it was posted with the get_the_date() function.

I would like the date to be displayed like this.

If it is posted today: just the time it was posted (18:24)

If it was posted this year: The day + month (22 may)

If it was posted before the current year: The normal date (2016-10-11)

Is this possible to do?

Thanks in advance! /Molle

Read more here: WordPress display the posted date


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: