smourph
4/4/2016 - 12:04 PM

Add body classes

Add body classes

function child_theme_add_body_classes($classes)
{
    // Adds a class of custom-background-image to sites with a custom background image.
    if (get_background_image()) {
        $classes[] = 'custom-background-image';
    }

    return $classes;
}

add_filter('body_class', 'child_theme_add_body_classes');