How can I apply css styling to the current day in the calendar widget? It seems there is no css class for the current day.


On my default calendar widget I get:

<td id="today">30</td>

so you could use #today.

It uses the get_calendar() function where we have the following:

if ( $day == gmdate( 'j', $ts ) &&
    $thismonth == gmdate( 'm', $ts ) &&
    $thisyear == gmdate( 'Y', $ts ) ) {
    $calendar_output .= '<td id="today">';
 } else {
    $calendar_output .= '<td>';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.