Soution code for : Add a custom class name to Wordpress body tag
We can use the body_class
filter, like so:
function my_plugin_body_class($classes) { $classes[] = 'foo'; return $classes; } add_filter('body_class', 'my_plugin_body_class');
Although, obviously, our theme needs to call the corresponding body_class
function.
No comments:
Post a Comment