Return to Snippet

Revision: 43631
at March 28, 2011 12:15 by ethicka


Initial Code
function not_home_class($classes) {
	global $post;
	if(!is_home()) $classes [] = 'not-home';
	return $classes;
}
add_filter('body_class', 'not_home_class');

Initial URL


Initial Description
This adds the class "not-home" to your body_class in Wordpress. Handy if you want to reset CSS from the index page.

Initial Title
"Not Home" Class for WordPress

Initial Tags
css, wordpress

Initial Language
PHP