RC2: The presence of a child file breaks the ethos carousel

The presence of a framework/views/header/base.php file in my child theme prevents the ethos carousel from displaying. The file simply copied over from the parent theme without any changes causes this.

I repeated this several times and cleared cache each time just to be sure.

A little more info: All I’m doing in the file is adding an id (which I know is unique throughout my site) to the body tag. Just as a test I tried temporarily adding it to the parent theme and the carousel renders, but viewing the source shows that my id is not added to the body tag. Again I cleared cache to verify this.

Hi @Sheri17,

Are you getting any javascript errors in the console? Not sure why it would cause the slider to fail unless some asset was not getting loaded somehow.

Also, if you’re just adding a id attribute to the body you could do something like this:

add_filter( 'body_class', function( $classes ) {
  $classes[] = '" id="your-id';
  return $classes;
}, 100000000000);

It’s definitely a hack since it relies on being the last class (hence the high priority) of the filter. If a class is sufficient you could also simply do:

add_filter( 'body_class', function( $classes ) {
  $classes[] = 'your-unique-body-class';
  return $classes;
});