I\'d like to place a directive in my theme\'s functions.php file which appends a classname to the wordpress body tag. Is there a built-in API method for this?
For exampl
In case you're trying to add classes to the body tag while in the Admin area, remember to use the admin_body_class
hook instead. Note that it's a filter which works slightly different since it passes a string of classes rather than an array, so your code would look like this:
add_filter('admin_body_class', 'my_admin_body_class');
function my_admin_body_class($classes) {
return $classes . ' my_class';
}