Does anyone know how I can add a sidebar to a WooCommerce archive page? I’m using generoi/sage-woocommerce and I see this line do_action(‘get_sidebar’, ‘shop’); But I can’t figure out how to show a sidebar there.
At this point I just registered a new sidebar in the setup.php
register_sidebar([
'name' => __('Shop', 'sage'),
'id' => 'sidebar-shop',
] + $config);
And I’ve created a partials/sidebar-shop.blade.php page where I call the sidebar like this:
@php(dynamic_sidebar('sidebar-shop'))
I am really wondering if this is the way to do it or if there is a better solution where I should be using the do_action(‘get_sidebar’, ‘shop’);