Here is a quick snippet you can use to programmatically add a class to the body element in WordPress.
|
|
<?php add_filter('body_class','custom_body_class'); function custom_body_class($classes) { // add 'some_class' to the $classes array $classes[] = 'some_class'; // return the $classes array return $classes; } ?> |