/ Published in: PHP

This adds the class "not-home" to your body_class in Wordpress. Handy if you want to reset CSS from the index page.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function not_home_class($classes) { global $post; if(!is_home()) $classes [] = 'not-home'; return $classes; } add_filter('body_class', 'not_home_class');
Comments
