Last active
August 29, 2015 14:17
-
-
Save webonaut/09f012c3fde2311ad844 to your computer and use it in GitHub Desktop.
WooCommerce - WC-Content-Wrappers ersetzen
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
// Beschreibung: Entfernt die Standard-WC-Contentwrappers und fügt eigene Wrappers hinzu; | |
// Speicherort: functions.php | |
// Quelle: http://docs.woothemes.com/document/third-party-custom-theme-compatibility | |
// Removing WC-Wrappers | |
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10); | |
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10); | |
// Add Own Wrappers | |
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 id="wrapper" class="container"><div id="content" class="row"><main role="main" class="col-md-12">'; | |
} | |
function my_theme_wrapper_end() { | |
echo '</main></div></div>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment