<div id="main-sidebar" class="fluid-sidebar sidebar <?php echo leap_bws_col_class( 3 ); ?>">

    <?php
    $replacement_sidebar          = leap_get_replacement_sidebar( 'shop-sidebar' );
    $woocommerce_archive_sidebar  = ot_get_option( 'woocommerce_archive_sidebar', '' );
    $woocommerce_products_sidebar = ot_get_option( 'woocommerce_products_sidebar', '' );

    if ( (is_shop() || is_product_category() || is_product_tag()) && $woocommerce_archive_sidebar ) {
        dynamic_sidebar( $woocommerce_archive_sidebar );
    } elseif ( is_product() && $woocommerce_products_sidebar ) {
        dynamic_sidebar( $woocommerce_products_sidebar );
    } elseif ( is_active_sidebar( $replacement_sidebar ) ) {
        leap_dynamic_sidebar( $replacement_sidebar );
    }
    ?>

</div>
