• I have a WooCommerce archive page (based on a product category) that is set to display sub-categories. I’d like to remove the sidebar on this page only to show a basic grid of sub-categories.

    I can use the OceanWP customiser to hide the sidebar, but this applies to all archive pages. I’ve also played around with this without success, and struggled to find a solution in other similar threads.

    Is the issue with the below because the archive ‘page’ created by WooCommerce isn’t an actual page, or something else?

    The url for the ‘page’ is ….co.uk/seeds/brands

    function my_post_layout_class( $class ) {
    
    	// Alter your layout
    	if ( is_page( 'brands' ) ) {
    		$class = 'full-width';
    	}
    
    	// Return correct class
    	return $class;
    
    }
    add_filter( 'ocean_post_layout_class', 'my_post_layout_class', 20 );

    Thanks for any help.

    • This topic was modified 3 years, 10 months ago by fizzers.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remove sidebar on category/sub-category archive page’ is closed to new replies.