Multicolour calendar
-
To colour various days (e.g. weekends) on the calendar:
template-functions-general.php
about line 465 change to$today = gmdate(‘j’, (time() + (get_settings(‘gmt_offset’) * 3600)));
$dow = strtolower(date(‘l’, $unixmonth+(($day-$today)*86400)));
if ($day == $today && $thismonth == gmdate(‘m’, time()+(get_settings(‘gmt_offset’) * 3600)))
echo ‘<td id=”today”>’;
else
echo “<td class=\”$dow\”>”;then add styles like:
#wp-calendar #today{ background-color:rgb(219, 123, 43);}
#wp-calendar .sunday{ background-color:#FFFFCC;}
#wp-calendar .saturday{ background-color:#FFFFCC;}
#wp-calendar .monday{ background-color:rgb(219, 193, 113);}
#wp-calendar .tuesday{ background-color:rgb(219, 183, 103);}
#wp-calendar .wednesday{ background-color:rgb(219, 173, 93);}
#wp-calendar .thursday{ background-color:rgb(219, 163, 83);}
#wp-calendar .friday{ background-color:rgb(219, 153, 73);}
- The topic ‘Multicolour calendar’ is closed to new replies.