If you are working with OceanWP and want to remove the sidebar from a custom post type it can be a little tricky. Luckily there is a simple snippet that just needs to be added to your functions.php file that will take care of this. You can use this to remvoe the sidebar from a custom post type archive page, single post page and taxonomy archive page. The result will be a full width page (not 100% full width).
// Remove the OceanWP sidebar from the custom post type called "demo"
function remove_sidebar_post_type_archive( $class ) {
if ( is_singular( array('demo') ) || is_post_type_archive( array('demo') ) ||is_tax(array('demo') )) {
$class = 'full-width';
}
return $class;
}
add_filter( 'ocean_post_layout_class', 'remove_sidebar_post_type_archive', 20 );