WordPress.org

Forums

Hemingway
[resolved] Woocommerce with Hemingway (4 posts)

  1. jrav001
    Member
    Posted 1 year ago #

    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.

  2. Anders Noren
    Member
    Theme Author

    Posted 1 year ago #

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

  3. jrav001
    Member
    Posted 1 year ago #

    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.

  4. Anders Noren
    Member
    Theme Author

    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic