Return to Snippet

Revision: 20476
at November 16, 2009 22:37 by joelhaus


Initial Code
function my_body_class( $class = '' ) {
    // Separates classes with a single space, collates classes for body element
    echo ' class="' . join( ' ', get_body_class( $class ) ) . '"';
}

add_filter('thesis_body_classes','my_body_class');

Initial URL
http://diythemes.com/forums/bug-reports/17306-thesis-breaks-wp-body_class-function.html

Initial Description
In v1.6, the Thesis Theme has a bug which removes a necessary space in the HTML body tag if you add a filter targeting the thesis_body_classes hook. To get the native WP body_class function to work, use this code:

Initial Title
Enable WordPress body class function in Thesis Theme

Initial Tags
css, php, wordpress, filter

Initial Language
PHP