A WordPress-centric search engine for devs and theme authors



body_class ›

Since2.8.0
Deprecatedn/a
body_class ( $class = '' )
Parameters:
  • (string|string[]) $class Space-separated string or array of class names to add to the class list.
    Required: No
    Default: (empty)
Defined at:
Codex:

Displays the class names for the body element.



Source

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