Add the following snippet to your WordPress Theme functions.php file to add a custom class to the body element:-