body_class( string|string[] $css_class = '' )

Displays the class names for the body element.


Parameters

$css_class

(Optional) Space-separated string or array of class names to add to the class list.

Default value: ''


Source

File: wp-includes/post-template.php

function body_class( $class = '' ) {
	// Separates classes with a single space, collates classes for body element
	echo 'class="' . join( ' ', get_body_class( $class ) ) . '"';
}


Changelog

Changelog
Version Description
2.8.0 Introduced.