WordPress body_class Template Tag

Some themes in WordPress position the header differently depending on where you are in the page. The Blog/Home section of the site might position the header as a sidebar while Single Page/Single Post template might place the header across the top of the page. In this example lets imagine we want a header to have a horizontal placement across the top, and do-away with the header-as-sidebar on the posts page.

In WordPress, locate header.php and look for the body_class template tag:

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

… where $class is either defined or undefined. Your Theme might reference the body_class without explicitly defining it.

<body <?php body_class();?>>

You will have to find out the name of your desired template tag you want to reference. For me, I needed to insert the single-post template tag to get the posts page to display the header the way I wanted it to.

<body <?php body_class('single-post');?>>

Wordpress Codex: