Last active
June 14, 2017 15:45
-
-
Save craigsimps/e033c66529a710fac1ff to your computer and use it in GitHub Desktop.
Add the day of the week to the body classes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add the day of the week to the body classes. | |
add_filter( 'body_class', 'add_day_of_the_week_to_class_names' ); | |
function add_day_of_the_week_to_class_names( $classes ) { | |
$classes[] = strtolower( date( 'l' ) ); | |
return $classes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment