Headers for posts?
-
I’d like to be able use images as headers to my posts, according to which day the post was made. For example, a post made on Monday would have the graphic for Monday as the header and so forth.
Problem being I’m an absolute PHP noob. After much searching and hacking I’ve been able to get as far as getting an image posted according to the day. However, it looks at todays date and not the date the post was made. Thus all my posts have the same header, regardless of the day they were made and it changes everyday. I told you I was a noob! Here is the code below:
<?php
$date=date(“D”);
if ($date==”Mon”)
echo'<img src=”images/mon.gif” />’;
if ($date==”Tue”)
echo'<img src=”images/tues.gif” />’;
(and so forth)
?>My question is how do I get it so the header images corresponds with the day the post was made and stays that way? Any help would be greatly appreciated.
The topic ‘Headers for posts?’ is closed to new replies.