除非我误解了你,否则这应该很容易做到,不需要使用插件。。。
Embed this in your functions.php:
function echoDayImage() {
// GET CURRENT DAY
$currentDay = get_the_time(\'l\');
// CHECK DAY AND ECHO SUITABLE IMAGE
if($currentDay = \'Sunday\') {echo TEMPLATEPATH.\'/images/Sunday.jpg\';}
elseif($currentDay = \'Monday\') {echo TEMPLATEPATH.\'/images/Monday.jpg\';}
elseif($currentDay = \'Tuesday\') {echo TEMPLATEPATH.\'/images/Tuesday.jpg\';}
elseif($currentDay = \'Wednesday\') {echo TEMPLATEPATH.\'/images/Wednesday.jpg\';}
elseif($currentDay = \'Thursday\') {echo TEMPLATEPATH.\'/images/Thursday.jpg\';}
elseif($currentDay = \'Friday\') {echo TEMPLATEPATH.\'/images/Friday.jpg\';}
elseif($currentDay = \'Saturday\') {echo TEMPLATEPATH.\'/images/Saturday.jpg\';}
}
Then in the location you wish to use it just use the function: <?php echoDayImage(); ?>
(在此处了解有关格式化日期/时间的更多信息:
Customizing the Time and Date)
EDIT 1 (for comment explenation)
function echoDayImage() {
// GET CURRENT DAY
$currentDay = get_the_time(\'l\');
echo TEMPLATEPATH.\'/images/days/\'.$currentDay;
}