Post Pic

Display 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.

Related Posts

No related posts.

20 Responses

May 07 2009 02:41

Simple but great tips!

May 07 2009 05:10

Easy, simple, useful, thanks. :)

May 08 2009 00:41

Simple, but the snipplet does show results. It’s a great addition for any unused whitespace.

May 08 2009 03:17

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.

May 08 2009 07:11

Excellent post, thanks

May 08 2009 22:01

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!

May 11 2009 08:26

Seems simple and professional, btw thanks for more php code source.

May 18 2009 02:11

@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.

May 20 2009 19:56

Useful tips ;) Thanks.

Jun 08 2009 19:27

Really useful for bloggers. Keep updating buddy..

Jun 12 2009 08:38

Its easy, thanks a lot…

Jun 27 2009 06:10

nice and simple tips but very helpful

Aug 14 2009 13:53

Thanks. It works a treat. :)

Sep 07 2009 15:38

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?

Sep 07 2009 18:20

how to show time of post ?

Nov 09 2009 17:17

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?

Dec 02 2009 15:29

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.

Dec 02 2009 15:45

found it! this function displays date/time in given format in blog’s defined language outside the loop

Jan 07 2010 13:50

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

Jan 18 2010 09:25

A great looking site. I love the whole designing and color theme. very fresh and appealing

Trackbacks:

Leave a Comment

* Name, Email, Comment are Required