Last active
August 29, 2015 14:01
-
-
Save Willem-Siebe/9cd10326c07f5e3e8076 to your computer and use it in GitHub Desktop.
Integrate WooCommerce in your custom theme, see http://docs.woothemes.com/document/third-party-custom-theme-compatibility/. Be aware that if your parent theme uses "woocommerce.php" to remove or rename this file (this change will be lost when updating the theme).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WooCommerce theme integration, see https://gist.github.com/Willem-Siebe/9cd10326c07f5e3e8076. | |
/** | |
* woocommerce_before_main_content hook | |
* | |
* @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content) | |
* @hooked woocommerce_breadcrumb - 20 | |
*/ | |
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 ); | |
/** | |
* woocommerce_after_main_content hook | |
* | |
* @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content) | |
*/ | |
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 ); | |
/** | |
* woocommerce_sidebar hook | |
* | |
* @hooked woocommerce_get_sidebar - 10 | |
*/ | |
remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 ); | |
function wsis_wrapper_start() { | |
echo '<article class="wsis-article-woocommerce">'; | |
} | |
function wsis_wrapper_end() { | |
echo '</article> <!-- end .wsis-article-woocommerce -->'; | |
} | |
add_action('woocommerce_before_main_content', 'wsis_wrapper_start', 10); | |
add_action('woocommerce_after_main_content', 'wsis_wrapper_end', 10); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment