The A to Z of How to Choose a Reliable Web Host For Your Blog

Display Current Date on WordPress with PHP

I have seen many bloggers using JavaScript to display the current day and date on their blog. However the same thing can be done using only one line of PHP. You might want to display the current date for various reasons.

For example, we often notice that News Blogs display the current date at the top of the site. Personally I find it quite useful because I am the type of person to always forget the date of the month.

So to display the current date, here is the php code:

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

The above code will display the date as: – The “date” function of Php can be modified to further suit your need. You can read more about the date and time customization here and here.

This article was contributed by Kurt Tewin

Kurt is a webmaster, blogger, and PHP developer who lives on the Paradise island of Mauritius and who has a crazy obsession for everything Wordpress and Blogging. He founded Icy Tips to share some of his tips with the community. He is also the owner of IC a famous multi-niche daily updated community blog and the C.E.O of Icy Evolution Ltd.

Kurt has written 24 awesome articles for us at Icy Tips

{ 1 comment… read it below or add one }

George Serradinho June 14, 2010 at 12:41 pm

This can change many things as you can do some css styling to put the date within an image. I see many sites doing this and it’s not as hard as one thinks.

Reply

Leave a Comment

CommentLuv badge

Previous post:

Next post: