How to display 'Today' and 'Yesterday' in WordPress Posts
-
Apparently, WordPress functions like the_date() and the_time() displays or returns the date of a post
But what if, I had to display a set of posts if published on the same day? It’ll be awkward to display the same dates all over the time
Do WordPress has the date/time function which supports displays of strings like
Today at 8:40pm
Yesterday at 10:40pmDo I need to make my own function for the date/time appending my desired strings and use only ‘the_time’ function?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to display 'Today' and 'Yesterday' in WordPress Posts’ is closed to new replies.