Home › Forums › Support › Conflict with new Elementor 'Archive' Pages › Reply To: Conflict with new Elementor 'Archive' Pages
June 13, 2018 at 9:55 pm
#599641
I wanted this to apply to the single theme pages as well so I modified your code to include them as well. It works but I’m not a programmer and I’m guessing there’s a better way to add the elementor_location_exists single type other than repeating it like I have. Thoughts?
add_action( 'wp', function() {
add_filter( 'body_class', function( $classes ) {
if ( function_exists( 'elementor_location_exits' ) && ( elementor_location_exits( 'archive', true ) || elementor_location_exits( 'single', true ) )) {
$classes[] = 'full-width-content';
}
return $classes;
} );
} );