Skip to content

Instantly share code, notes, and snippets.

@webonaut
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save webonaut/09f012c3fde2311ad844 to your computer and use it in GitHub Desktop.
Save webonaut/09f012c3fde2311ad844 to your computer and use it in GitHub Desktop.
WooCommerce - WC-Content-Wrappers ersetzen
// 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