Home › Forums › Support › Any way to disable elements and sidebar for all WooCommerce product pages? This topic has 7 replies, 3 voices, and was last updated 5 years, 10 months ago by Tom. Viewing 8 posts - 1 through 8 (of 8 total) Author Posts May 20, 2018 at 10:20 am #580186 Shaun Hi guys, I’ve got approximately 100 WooCommerce products that I’ll be importing soon. Is there any way I can mass disable the sidebar and certain elements (e.g. page header) from the individual product pages? Thanks in advance. May 20, 2018 at 11:37 am #580226 LeoStaff Customer Support Hi there, Are you wanting sidebar on the main products page? If not then you can just use this setting here: https://docs.generatepress.com/article/woocommerce-overview/#shop There shouldn’t be page header showing by default unless it was assigned to them in page header global location: https://docs.generatepress.com/article/page-header-global-locations/ Let me know if this helps. May 20, 2018 at 6:25 pm #580401 Shaun Thanks Leo! I managed to get rid of the sidebar for the products’ pages. I also want to specifically disable the Top Bar for these pages. Is there a way to do it en masse? May 20, 2018 at 8:16 pm #580430 LeoStaff Customer Support Try this snippet: add_action( 'wp', 'lh_disable_woo_topbar' ); function lh_disable_woo_topbar() { if ( is_woocommerce() ) { remove_action( 'generate_before_header','generate_top_bar', 5 ); } } May 20, 2018 at 9:21 pm #580449 Shaun Thanks Leo. Do I just copy and paste this into Simple CSS? May 20, 2018 at 10:00 pm #580460 TomLead Developer Lead Developer That code can be added using one of these methods: https://docs.generatepress.com/article/adding-php/ May 20, 2018 at 10:44 pm #580471 Shaun Awesome! Thanks Tom and Leo. The code works like a charm! May 21, 2018 at 8:10 am #580846 TomLead Developer Lead Developer You’re welcome 🙂 Author Posts Viewing 8 posts - 1 through 8 (of 8 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In