Add a Custom Class to the Body Element

If you would like to add a custom class to the body element, use the PHP snippet below:

add_filter( 'body_class','tu_add_body_class' );
function tu_add_body_class( $classes ) {
  $classes[] = 'my-custom-body-class';
  return $classes;
}