Custom Sidebar for Custom product taxonomy
-
Hi, I created custom taxonomy template using your archive-product.php. Instead of do_action( ‘woocommerce_sidebar’) part, I’d like to apply one of the created sidebar from your ‘sidebars’ menu for custom sidebar pages. Is it possible?
If my approach is wrong, can you please let me know what is the best practice? Thank you
Attachments:
You must be
logged in to view attached files.
Hi,
You can try to replace that code with a snippet from sidebar.php
file and replace the line
<?php dynamic_sidebar( $sidebar_name ); ?>
and put your sidebar name instead of the $sidebar_name
variable.
Regards
Really appreciated your quick answer. One more question.
I created a custom taxonomy page template. Do I need to create sidebar-custom.php (for example) to apply this specific sidebar widget to the custom taxonomy page for example? Thousand thanks.
Sorry, but we can’t answer this question since it is more related to additional code customization.
Thanks for your answer
I copied sidebar.php and archive-product.php(change to taxonomy-custom.php) to my child theme folder.
I found no reason not showing sidebar on archive page. Please help.
We can’t know why it doesn’t work for you. Maybe you have some errors in the code. Sorry, but additional code customization is out of our theme support scope.