Support » Plugins » Woocommerce

  • ed

    (@wesleysoccer)


    Does anyone know how to fix the dropping sidebar issue with the Woocommerce plugin? This only happens on my main shop page (sidebar drops)….checkout and cart pages work great….

Viewing 15 replies - 1 through 15 (of 50 total)
  • I found my solution!

    Note: the solution depends on your theme

    In your theme/functions.php, add the following lines:

    // WOOCOMMERCE
    
    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', create_function('', 'echo "<div id=\"content-body\">";'), 10);
    add_action('woocommerce_after_main_content', create_function('', 'echo "</div>";'), 10);

    Instruction #1 and #2 (the ones starting with “remove”) tells your theme to remove woocommerce hooks.

    Instruction #3 and #4 (the ones starting with “add”) tells your theme to consider your own rules, rules that you must change to match your theme structure (whether you use div, class, section etc), that you can find in your theme/page.php.

    Here, what is specific for my theme is that I use:

    • "<div id=\"content-body\">" for #3 and
    • "</div>"

    but for some people, for instance, the hook can be:

    • "<section id=\"main\">" for instruction #3, and

    the closing instruction #4 will be:

    • "</section>"

    ‘Hope that helps anyone.
    Peace.

    ed

    (@wesleysoccer)

    Thanks so much I will let you know if this works out for me…I’m also having an issue with the lightbox effect “directing to Paypal” not working correctly…maybe javascript issues…what do you think?

    ed

    (@wesleysoccer)

    Here is the first few lines for code but it’s not working for me `<?php get_header(); ?>

    <div class=”container”>
    <?php get_template_part(‘includes/breadcrumbs’); ?>
    <div id=”content-area” class=”clearfix”>`

    that is my page.php. Just not working….

    I assume you tried to inject:
    "<div id=\"content-area\">" for instruction #3 and "</div>" for #4 in the 1st piece of code I pasted, and that you passed it in your theme/functions.php file right?

    ed

    (@wesleysoccer)

    yes did not work…I will try again

    ed

    (@wesleysoccer)

    I even followed these instructions http://www.woothemes.com/woocommerce-codex/theming-woocommerce/

    no dice

    er… then maybe you should look at your home page and check the output code (my chromium browser highlighted the different DIVs as I hovered the code and it’s how I really found the name of the DIV used to contain all my website body’s contents so I could rename woocommerce container into the one used by my theme).

    edit: Yeah I saw those links, it’s exactly what I did, copying those 2×2 lines. I’m sure you just have to nail the exact name for the div/class/whatever for it to work.

    ed

    (@wesleysoccer)

    this is my demo site http://demos.muntzdesigns.com/

    Can you find it for me?

    Your wild guess wasn’t too bad.

    I suggest you try those few (you missed the “container” div rendered just before the “content-area” div):

    • “<div class=\”container\”>” as #3 and “</div>” for #4
    • or the next rendered div (the one you got) “<div id=\”content-area\” class=\”clearfix\”>” as #3 and “</div>” for #4
    • or the same div by just putting “<div class=\”clearfix\”>” as #3 and “</div>” for #4

    Let me know if it works

    edit: actually I see another one that could work:
    “<div id=\”left-area\”>” #3 and “</div>” #4

    ed

    (@wesleysoccer)

    when i used “container/” the left side is correct and align perfect but the sidebar is still down…you think i should use another one with the container in #3

    Try “<div id=\”left-area\”>” in #3…

    ed

    (@wesleysoccer)

    tried it…no dice…

    Then I don’t see… :/ Except that you would have made an error in the syntax, putting a slach (/) instead of an anti-slash somewhere (\), or forgotten something…

    Last attempt, try “<div class=\”post entry clearfix\”>”

    I’m going to troubleshoot the rest of the plugin, see if I get this paypal issue you were talking about

    edit: the left-area one looked like your best (because it doesn’t spill over the sidebar) bet but eh…

Viewing 15 replies - 1 through 15 (of 50 total)
  • The topic ‘Woocommerce’ is closed to new replies.