Formatting date and time display in single post
-
I know I can change the information displayed for date and time in template-tags.php for single posts. But I would like to change how that information is formatted.
esc_html( get_the_date(j M.Y))
works just fine and looks like 26 Nov 2014 – all on one line.
But if I want to make it be something akin to:
26
Nov 2014with 26 centered and larger than the month and year, I am not sure how to do that. Putting html in with the date codes does not work. Neither does using ‘ or / to prevent WordPress from interpreting the html as WordPress tags.
————-
Changing this info for the loop where the post snippets are listed works just fine by editing the loop, so I know it’s possible.
- The topic ‘Formatting date and time display in single post’ is closed to new replies.