WordPress.org

Support

Support » Themes and Templates » [Resolved] Woocommerce with Hemingway

[Resolved] Woocommerce with Hemingway

  • Is anyone able to use woocommerce with this theme?

    I’m having a hard time figuring what I need to use for the woocommerce_before_main_content and woocommerce_after_main_content in order to have Hemingway display properly on a woocommerce shop page. Itys ends up with an extra div, making the sidebar too wide. Removing the extra div causes the .wrapper .section-inner to not close before the .footer.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author Anders Noren
    Member

    @anlino

    If you’ll send me a link to the page in question, I’ll take a look at it.

    jrav001
    Member

    @jrav001

    Thank you very much for your kind offer Anders, but unfortunately, it is not on a live server.

    Here is what I was using. The problem seems to be due to get_sidebar' being inside of.wrapper .section-inner`

    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', 'hemingway_theme_wrapper_start', 10);
    add_action('woocommerce_after_main_content', 'hemingway_theme_wrapper_end', 10);
    
    function hemingway_theme_wrapper_start() {
    	echo '<div class="wrapper section-inner"><div class="content left"><div class="posts"><div class="post">';
    }
    
    function hemingway_theme_wrapper_end() {
    	echo '</div></div></div></div>';
    }

    I tried all sorts of combinations, but just couldn’t get it to work.

    Since my original post I have moved things around a bit so it is displaying properly, but it would be nice to know how to do this the correct way for future reference.

    Theme Author Anders Noren
    Member

    @anlino

    Glad you got it working! Hemingway hasn’t been tested with WooCommerce (at least not by me), and I’m really not familiar enough with the plugin to say how to integrate it properly with the theme. Sorry.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Woocommerce with Hemingway’ is closed to new replies.