• Hello,

    I’m building an theme on WordPress with Woocommerce but I can’t get the hook “woocommerce_before_main_content” to work.

    I tryed this:
    http://docs.woothemes.com/document/third-party-custom-theme-compatibility/

    remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
    remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
    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 class="full-box content-box home"><div id="page" class="center-box content"><div class="content-left">';
    }
    
    function my_theme_wrapper_end() {
      echo '</div></div></div>';
    }

    But doesn’t seem to do anything.
    I also tryed the alternative that was posted in this forum:
    https://github.com/jigoshop/Jigoshop/wiki/How-to-Properly-Wrap-Jigoshop-Content-in-your-WordPress-Theme

    does somebody know what i’m doing wrong?

  • The topic ‘Woocommerce_before_main_content doesnt work’ is closed to new replies.