Disabling sidebar in woocommerce

In woocommerce shop page (archive-product.php) i have listed category instead of product-listing, which list parent category,so when i clickin parent category im redirect to child-category listing page,lastly when click on child-category im redirect to product listing of child-category,so what

i want is that i want hide woocommerce side-bar in parent-category and child category page but want to display woocommerce side-bar in product-listing page only…??

Solved By creating custom template.

parent-category = parent-category.php (custom-template) 
child-category = child-category.php(custom-template) 
product-listing = woocommerce-template 
Parent-template { parent-category loop start $cat-id = woocommerce category id <a href="<?php echo id? $cat-id "></a> parent-category loop ends 
Child-template { $parent_cat_id = $_GET["id"];
// gets parent-category id from parent-template 
Child-category loop start 'child-of' = $parent_cat_id , Child-category loop ends 
1 Like