December 21, 2015

Pet Peeves – Post Dates

One of my pet peeves is regarding post dates. For the love of GAWD, why don’t people use them more frequently? Especially if I’m on a site that’s providing technical support of some kind. If you have version-sensitive or time-sensitive information on your blog, USE POST DATES!!

I recently ran into an issue on a PHP tutorial site where they were giving an example on how to write arrays properly, and I didn’t realize I was dealing with a post that was more than 5 years old. As a result my site was acting crazy and it took me an additional 2 hours to track down the cause.

Web technology is an ever changing landscape. What might be good advice today, could be absolute bollocks tomorrow. So, if you’re creating your own WordPress theme, or want to modify an existing theme please put this somewhere.

<?php the_date(); ?>
Post Date Code

You can refer to this link to get the exact formatting you prefer.

https://codex.wordpress.org/Formatting_Date_and_Time