Changing theme dynamically

Hi

Is it possible to change the theme css (setting a different background, font, colours, etc), depending on the page visited?

Im actually doing this on genesis functions.php setting a filter for some page categories.

add_filter( ‘body_class’, ‘sp_body_class’ );
function sp_body_class( $classes ) {
if ( is_category( ‘sample-category’ ) )
$classes[] = ‘custom-class’;
return $classes;
}

How should I proceed with a bb child theme?

Hey Edo,

You should be able to do this via custom CSS only. Each page has its own unique page-id-# class added to the body tag. You just have to target that class and add the selectors accordingly. It should look something like this.

.page-id-2 {
  background: url(www.domain.com/bg.jpg);
}

Hope this helps!

Ben