Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

User:Esmi/body class

Description

Collates and displays classes for body element.

See http://codex.wordpress.org/Template_Tags/body_class

Usage

 <?php body_class('$class'); ?> 

Default Usage

 <?php body_class(); ?> 

Parameters

$class
(string) (optional) One or more classes to add to the class list
Default: None

Return

(string) 
List of classes for the body element.

Example

 <body <?php body_class(); ?>

Changelog

  • Since: 2.8.0

Source File

body_class() is located in post-template.php.

Related

See also index of Function Reference and index of Template Tags.