Inspired by the post “little calendar hack for wordpress” from Introducing the all new Gavin Laking, I decided to implement an old idea : display a picture based on the date….To do so :

Within the main “post” loop (index.php) :

<img src="http://yoursite.com/images/<?php echo the_time('m_d'); ?>.png" alt="<?php the_time('F jS, Y'); ?>" width="96px" height="96px">

Easy, simple but the result is pretty…

Concerning the pictures, I discovered them on some site, I downloaded them because I knew they will be usefull one day… I totally forgot from where they come from …Sorry for the author…My apologies . If you have something against my usage, don’t hesitate to say it to me, I will remove and replace them straigth away.

2 commentaires

  1. Hi, great coding tip!

    Can you please post the calender pngs? thanks!


Comments are closed, but trackbacks and pingbacks are open.