
Many blogs displays the current date on their blog header. It looks profesional, and it is also useful, especially if your blog posts are dated. Here is a very easy way to add today’s date on your WordPress blog.

Many blogs displays the current date on their blog header. It looks profesional, and it is also useful, especially if your blog posts are dated. Here is a very easy way to add today’s date on your WordPress blog.
Open your header.php file (or any other file) and paste the following code:
<?php echo date('l jS F Y'); ?>
The date format can be easily formatted. You can get more info on the date() php function here.
20 Responses
Simple but great tips!
Easy, simple, useful, thanks.
Simple, but the snipplet does show results. It’s a great addition for any unused whitespace.
Unfortunately, this doesn’t work for me, as my site is hosted in the US and I am in New Zealand.
If anyone knows of a work around, I’d be really grateful.
Excellent post, thanks
i actually don’t prefer putting dates on my posts, because i’m not sure i want readers to know how often (or rarely) I post or how old the information is!
Seems simple and professional, btw thanks for more php code source.
@michelle
Follow the “more info on the date() php function here” in the OP which will take you to http://php.net/manual/en/function.date.php where it shows you how to set timezones.
Useful tips
Thanks.
Really useful for bloggers. Keep updating buddy..
Its easy, thanks a lot…
nice and simple tips but very helpful
Thanks. It works a treat.
I’m looking for a way to include the current date and or time into the actual post or page, is there a way to do this?
how to show time of post ?
This doesn’t really account for the frontend language, it will display in english on most installations. Is there no wordpress ‘tag’ to get the date displayed in the frontend language?
well, it’s basic php function.. it’s more interesting how to get current date using wordpress functionality, e.g. using current language settings.
i would like to have wordpress functions the_time() & the_date() to work outside the loop. that would be great.
found it! this function displays date/time in given format in blog’s defined language outside the loop
Hi
Just like to also figure out how to post Current date post without showing the future post created. Usually WP just add new post as they come in.
Any help would be much appreciated
A great looking site. I love the whole designing and color theme. very fresh and appealing
Trackbacks: