version, '3.0', ">=" ) ) {
add_theme_support( 'wc-product-gallery-zoom' );
add_theme_support( 'wc-product-gallery-lightbox' );
add_theme_support( 'wc-product-gallery-slider' );
}
}
add_action( 'after_setup_theme', 'blossom_coach_woocommerce_support');
/**
* Woocommerce Sidebar
*/
function blossom_coach_wc_widgets_init(){
register_sidebar( array(
'name' => esc_html__( 'Shop Sidebar', 'blossom-coach' ),
'id' => 'shop-sidebar',
'description' => esc_html__( 'Sidebar displaying only in woocommerce pages.', 'blossom-coach' ),
'before_widget' => '',
'before_title' => '
',
) );
}
add_action( 'widgets_init', 'blossom_coach_wc_widgets_init' );
/**
* Before Content
* Wraps all WooCommerce content in wrappers which match the theme markup
*/
function blossom_coach_wc_wrapper(){
?>
';
dynamic_sidebar( 'shop-sidebar' );
echo '';
}
}
add_action( 'blossom_coach_wo_sidebar', 'blossom_coach_wc_sidebar_cb' );
/**
* Removes the "shop" title on the main shop page
*/
add_filter( 'woocommerce_show_page_title' , '__return_false' );
if( ! function_exists( 'blossom_coach_wc_cart_count' ) ) :
/**
* Woocommerce Cart Count
*
* @link https://isabelcastillo.com/woocommerce-cart-icon-count-theme-header
*/
function blossom_coach_wc_cart_count(){
$cart_page = get_option( 'woocommerce_cart_page_id' );
$count = WC()->cart->cart_contents_count;
if( $cart_page ){ ?>
cart->cart_contents_count; ?>