krista-m
12/20/2017 - 1:14 AM

WooCommerce integration

Add WooCommerce integration to Genesis child theme

//* Add WooCommerce integration
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
add_action('woocommerce_before_main_content', 'my_theme_wrapper_start', 10);
add_action('woocommerce_after_main_content', 'my_theme_wrapper_end', 10);

function my_theme_wrapper_start() {
  echo '<div class="content-sidebar-wrap">';
}

function my_theme_wrapper_end() {
  echo '</div>';
}

//* Remove WC integration message
add_action( 'after_setup_theme', 'woocommerce_support' );
function woocommerce_support() {
    add_theme_support( 'woocommerce' );
}