skip to Main Content

Hiding Woocommerce Sidebar on Single Product Pages

I'm new here. I have installed a sidebar on my Woocommerce shop page like so (in a woocommerce.php file): <main role="main" class="container row"> <div class="col-md-2 filtersmargin"> <?php if (is_active_sidebar('sidebar')) { dynamic_sidebar('sidebar'); } ?> </div> <div class="col-md-10"> <div class="woocommerce"> <?php woocommerce_content();…

VIEW QUESTION

Include PHP file in Woocommerce template

I'm customising the Woocommerce content-single-product.php and want to add a custom template file for the sidebar. so far I've tried: <?php require get_stylesheet_directory() . '/layout/page-sidebar.php'; ?> This works elsewhere in my theme but not on Woocommerce templates where it gives…

VIEW QUESTION
Back To Top
Search