body_class not working in Storefront child theme?
-
I’m trying to add a class to the body of my Storefront child theme, and it doesn’t seem to be working. I’m using a bog-standard function copied and pasted from the web, which works just fine if I put it in the Storefront theme’s functions.php but doesn’t work at all when I put it in my child theme’s functions.php. I’ve got no problem doing other standard things like enqueuing scripts and styles from the child theme, but this one just silently fails. What’s going on?
add_filter( 'body_class', 'my_class_names' ); function my_class_names( $classes ) { // add 'class-name' to the $classes array $classes[] = 'casfassafasd'; // return the $classes array return $classes; }
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘body_class not working in Storefront child theme?’ is closed to new replies.