Skip to content

Instantly share code, notes, and snippets.

@craigsimps
Last active June 14, 2017 15:45
Show Gist options
  • Save craigsimps/e033c66529a710fac1ff to your computer and use it in GitHub Desktop.
Save craigsimps/e033c66529a710fac1ff to your computer and use it in GitHub Desktop.
Add the day of the week to the body classes.
<?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