I’m trying to add a class to the <body>
.
What am I doing wrong here (in my theme’s functions.php
which is loading correctly):
add_filter('body_tag_attributes', 'add_bclass'); function add_bclass( $attributes ) { $attributes['class'] = trim('My_custom_bodyclass '.$attributes['class']); return $attributes; }