Same issue here.
I’m going to dig for the why and wherefores…
edit: it seems this thread is a duplicate of:
In the latest the case seems to be solved by following the steps given by https://github.com/jigoshop/Jigoshop/wiki/How-to-Properly-Wrap-Jigoshop-Content-in-your-WordPress-Theme
I’m going to try that and see what is what
edit2: this thread is also a duplicate of this interesting page http://wordpress.org/support/topic/plugin-woocommerce-ecommerce-plugin-for-wordpress-template-problem?replies=12
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
but for some people, for instance, the hook can be:
"<section id=\"main\">"for instruction #3, and
the closing instruction #4 will be:
‘Hope that helps anyone.
Here is the first few lines for code but it’s not working for me `<?php get_header(); ?>
<?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?
I even followed these instructions http://www.woothemes.com/woocommerce-codex/theming-woocommerce/
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.
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
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
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…
- The topic ‘Woocommerce’ is closed to new replies.