A WordPress-centric search engine for devs and theme authors



body_class ›

Since2.8.0
Deprecatedn/a
body_class ( $class = '' )
Parameters:
  • (string|array) $class One or more classes to add to the class list.
    Required: No
    Default: (empty)
Defined at:
Codex:

Display the classes for the body element.



Source

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