Не знаю как вывести свой сайдбар на страницах woocommerce.
Зарегистрировал сайдбар в functions:
//второй сайдбар под шоп
function grad_market_widgets_init1() {
register_sidebar(
array(
'name' => esc_html__( 'Sidebar-shop', 'grad_market' ),
'id' => 'sidebar-2',
'description' => esc_html__( 'Add widgets here.', 'grad_market' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
)
);
}
add_action( 'widgets_init', 'grad_market_widgets_init1' );
Создал сам шаблон сайдбара sidebar-shop.php и закинул в корневую папку темы
Теперь хочу вывести его в woocommerce, но не знаю что вписать:
<?
/**
* Hook: woocommerce_sidebar.
*
* @hooked woocommerce_get_sidebar - 10
*/
do_action( 'woocommerce_sidebar' ); ?>