Hook Widget to Woo Theme in functions.php

You should use the dynamic_sidebar to spit out the widgets inside the newly created sidebar before the woo main container.

add_action( 'woo_main_before', 'woo_sidebar' );
function woo_sidebar() {
    if (is_woocommerce()) { 
        echo '<div class="primary">';
        dynamic_sidebar( 'filters' );
        echo '</div>';
    }
}

Leave a Comment