これがスマートな方法かどうか素人にはわかりませんが、一応、カレンダーの曜日の背景色を変えることが出来ましたので、ここにメモしておきます。
まず、次のプラグインを使いますのでインストールしておきます。まだ、有効化はしません。
休日表示付きリアルタイムカレンダー for WordPress v1.9: 小粋空間
このプラグイン・フォルダーの中で、2つのファイルを手直しします。
1つ目は、「util.js」です。青色の所を換えたり付け加えたりします。
function setWeekColor() {
var calendar = document.getElementById('wp-calendar');
if (!calendar) return;
var th = calendar.getElementsByTagName('th');
for (i = 0; i < th.length; i++) {
if (th[i].getAttribute('title') == '日曜日') {
th[i].className = 'sunday';
}
if (th[i].getAttribute('title') == '土曜日') {
th[i].className = 'saturday';
}
if (th[i].getAttribute('title') == '月曜日') {
th[i].className = 'monday';
}
if (th[i].getAttribute('title') == '火曜日') {
th[i].className = 'tuesday';
}
if (th[i].getAttribute('title') == '水曜日') {
th[i].className = 'wednesday';
}
if (th[i].getAttribute('title') == '木曜日') {
th[i].className = 'thursday';
}
if (th[i].getAttribute('title') == '金曜日') {
th[i].className = 'friday';
}
}
}
2つ目は、「calendar.css」です。以下のように、全く換えてしまいます。
#wp-calendar th.monday ,
#wp-calendar th.tuesday ,
#wp-calendar th.wednesday ,
#wp-calendar th.thursday ,
#wp-calendar th.friday {
background-color: yellow ;
}
#wp-calendar th.sunday {
background-color: red ;
}
#wp-calendar th.saturday {
background-color: #87ceeb ;
}
そして、このプラグインを有効化します。
トラックバックURL:
https://serene.sakura.ne.jp/blog/2011/05/09/1030/813.php/trackback