How to add custom widget area to woocommerce ccategory page?
-
Hello,
I want to add a sidebar to woocommerce category page, so i need to make a widgetized area on the page template.
i added the following code to my child theme’s functions.php (i use Divi as main theme):
if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => 'kategoriwidget', 'before_widget' => '<div class = "kategoriwidget">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>', ) );
also i added the following code to woocommerce archive-product.php page:
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('kategoriwidget') ) : ?> <?php endif; ?>
But it does not work on my site, am i missing something here?
Thanks in advance
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘How to add custom widget area to woocommerce ccategory page?’ is closed to new replies.