• For example, i want to make the background of the cells in other days that have a post in them light blue, and the font bold and black. as for today, i want it to have a background color of blue with white text. how can i do this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • great Question!!!

    This can be done with the following conditional tags:

    <?php
    // what kind of archive are we showing?
    if (is_home())
    {
    if (date('D, j, M, y') != get_the_time('D, j, M, y'))
    {
    // this post was written on a different day
    // so let's styke it differently
    echo '<div class="post"><div class="post_cal">';
    } else {
    echo '<div class="post_today"><div class="post_cal_today">';
    }
    } else {
    echo '<div class="post_today"><div class="post_cal_today">';
    }

    ?>

    Modify as needed to fit with your class names. Also, there is some unnecessary code there that is only relevant if you are working with multiple archive types in a single template.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How do i make ‘todays’ style appear different fr’ is closed to new replies.