WordPress.org

Support

Support » How-To and Troubleshooting » Change Calendar Color

Change Calendar Color

  • Hi, I want to change the font color of my calendar. I want the calendar to be a different font color than all the other text, and I’m struggling with where to put the <font color="#FFFFFF"> code. I suspect it’s somewhere in wp-includes/template-functions-general.php,but I can’t figure out where.

    Any help??? 🙂 THANK YOU!

Viewing 4 replies - 1 through 4 (of 4 total)
  • It’s in the css – I’ll look.

    ….

    #wp-calendar td {
    color: #ff0000;

    Alter that line above.

    Oh I just did this, I’ll check what I did.

    Mine does do a weird thing though of the days before the current date seem to be reverting to the original colour, so there’s obviously some further code I must change.

    podz: Also these, I think, if you want today’s date and hover to match the change:

    #wp-calendar a:hover {
    background: #ccff99;
    color: #ff0000;

    #wp-calendar td:hover, #wp-calendar #today {
    background: #ccff99;
    color: #ff0000;

    Changing background value as well if you want to change the colour of the hover block over the date.

    Now, what would cause my dates prior to the current date to revert to the original colour? That I haven’t been able to figure out.

    The css didn’t work because I disabled css.

    I know, I know, I should not have done that, but I never learned how css worked, so I disabled it so that I could have greater control over how my pages look. Perhaps I’m paying for that now.

    Anyhow, I’m sure I can add <font color="#FFFFFF"> in the right place in the wp-includes/template-functions-general.php file. I just don’t know where.

    I figured it out!

    in the wp-includes/template-functions-general.php file:

    Where it says <table id="wp-calendar"> I changed it to <table id="wp-calendar" style="color: #FFFFFF">.

    Also, in order for the hyperlinks to be that color as well, add style="color: #FFFFFF" as shown in the following lines:

    echo "ntt".'<td abbr="' . $month[zeroise($previous->month, 2)] . '" colspan="3" id="prev"><a style="color: #FFFFFF" href="' . NOTE: this line appears twice

    echo '<a style="color: #FFFFFF" href="' . get_day_link($thisyear, $thismonth, $day) . "\" title=\"$ak_titles_for_day[$day]\">$day</a>";

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Change Calendar Color’ is closed to new replies.
Skip to toolbar