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.

Categories: PHP

2 Comments

Miko · 16/11/2004 at 05:10

Hi, great coding tip!

Can you please post the calender pngs? thanks!

?????? ????|Cool Links » Daily Links · 03/10/2006 at 05:19

[…] Apne blog par Date Image daalein (tags: a aajkejugad) […]

Comments are closed.

%d bloggers like this: