Skip to content

Instantly share code, notes, and snippets.

@craigsimps craigsimps/functions.php
Last active Jun 14, 2017

Embed
What would you like to do?
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
You can’t perform that action at this time.