mbcreation

woocommerce_before_main_content

May 22nd, 2014
3,218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.55 KB | None | 0 0
  1. // Nous supprimons d'abord le HTML suggéré par défaut par WooCommerce
  2. remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
  3.  
  4. // Nous déclarons ensuite la fonction qui va injecter notre propre balisage
  5. add_action('woocommerce_before_main_content', 'my_theme_wrapper_start', 10);
  6.  
  7. function my_theme_wrapper_start(){
  8.     // Ceci est un exemple. Vous devez afficher ici votre propre balisage qui peut être bien plus complexe. Ou limiter à un seul div
  9.     echo '<div id="main" class="eightcol first clearfix" role="main">';
  10. }
Advertisement
Add Comment
Please, Sign In to add comment