Top

Daily Tip: How to Automatically Display Current Date in WordPress

January 1, 2012

In order to get the current date to automatically display in your WordPress site, you just need to add a line of code to your theme wherever you would like it to show up. (Appearance > Editor)

An example would be to add the following line of code:

<?php echo date('l jS F Y'); ?>

After adding that line to my header.php file, here’s the result.

You can configure the date to appear as you like. For more information on your options, see the WordPress Date and Time page.

Photo: New Year’s Day Calendar from BigStock

Comments

Got something to say?

Bottom
Article Archive  |  This site is a historical archive of pressography.com, a WordPress plugin and theme blog that published between 2006 and 2012. It is preserved for reference and is not operated by, affiliated with, or endorsed by its original authors. Nothing here is for sale and no form on this site is active. If you are the original owner and would like this domain returned, please get in touch.