Alex Barber | Digital Artist

time to push the pixels

WordPress Filtering Body Class in Thematic

http://thematictheme.com/forums/topic/body-class-conflict-with-the-events-calendar-pro/


function childtheme_setup() {
add_theme_support( 'thematic_legacy_body_class' );
}
add_action('thematic_child_init', 'childtheme_setup');

function childtheme_body_class( $classes ) {

if ( is_category('16') ) {
$classes[] = 'noise';
} else if ( in_category('11') ) {
$classes[] = 'culture team';
$key = array_search('single', $classes);
echo 'rel="'.$key.'" ';
unset($classes[$key]);
}

return $classes;

}
add_filter( 'body_class', 'childtheme_body_class' );

Next Post

Previous Post

© 2021 Alex Barber | Digital Artist