Enable WordPress body class function in Thesis Theme

/ Published in: PHP
Save to your folder(s)

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:

Copy this code and paste it in your HTML
  1. function my_body_class( $class = '' ) {
  2. // Separates classes with a single space, collates classes for body element
  3. echo ' class="' . join( ' ', get_body_class( $class ) ) . '"';
  4. }
  6. add_filter('thesis_body_classes','my_body_class');

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

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.