Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save shihabiiuc/508f899069f8e474b2abadcea7c97ee1 to your computer and use it in GitHub Desktop.
Save shihabiiuc/508f899069f8e474b2abadcea7c97ee1 to your computer and use it in GitHub Desktop.
// First remove default wrapper
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
// Then add new 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 '<section id="main">';
}
function my_theme_wrapper_end() {
echo '</section>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment