I just upgraded a client from WP E-Commerce 3.7 to 3.8 and all my sidebars disappeared! This is how I fixed it:
Background info
The freshest software
First of all, I’m using a child theme of Thematic (version 0.9.7.7) and the latest versions of WP E-Commerce (3.8.6) and WordPress (3.2.1). I just downloaded everything today so its all freshy fresh.
The issue
I have widgets in my primary, secondary, and three subsidiary sidebars. They show up on every page on my site except for the products page and single products pages.
I tried everything!
Before this fix I tried disabling all my plugins, which did nothing. Then I tried some other themes: the default WordPress theme Twenty Eleven also had no sidebars on the products page, but Twenty Ten worked fine. This was a clue.
It prolly has something to do with…
This function: dynamic_sidebar() is being overridden or whatever. That’s all I got.
The fix
WP E-Commerce uses the page.php template for the products page and single products pages. To get your sidebars back, copy the page.php file from themes/thematic/page.php folder to themes/yourtheme/page.php. Comment out thematic_sidebar(); on line 10, like this:
// thematic_sidebar();
Then add these lines directly under the code you just commented out:
thematic_primary_aside();
thematic_secondary_aside();
Save the file and view the products page, your primary and secondary sidebars should be there. Now to get your footer widgets back, copy themes/thematic/footer.php to themes/yourtheme/footer.php. Comment out thematic_footer(); on line 16, like this:
// thematic_footer();
Then add the following three lines right under that:
thematic_1st_subsidiary_aside();
thematic_2nd_subsidiary_aside();
thematic_3rd_subsidiary_aside();
Save the file, reload the page in your browser, and all your sidebar widgets should be there!
7 Comments
This disappearing sidebar trick was driving me nuts! Such a stupid and annoying bug! Your page.php fix didn’t work for me (although I used something similar to fix a similar issue I had with the twentyten theme)
Another approach over at the getshopped forum worked – http://getshopped.org/forums/topic/themefunctionsphp-breaks-thematic-sidebar/
The only problem now is remembering to fix it each time I upgrade wp-ec.
The fear of upgrades is why I’m abandoning WP E-Commerce all together. It’s just not worth it!
Oh thank you, thank you. I was banging my head against this for days with no answer. This certainly hasn’t improved my opinion of wp e-commerce much though, considering that their own support site hasn’t been able to sort this out yet.
I agree Robert, wp-ecommerce is broke and nobody’s about to fix it.
Hi,
I’m having the same problem with the TwentyEleven theme. The ‘Products Page’ is fine, but all the individual product pages have the right sidebar shoved down at the bottom.
I’ve looked at most forums on the matter, specifically this: http://getshopped.org/forums/topic/sidebar-not-showing-in-the-2011-theme/
But not much luck, maybe i’m just doing it wrong ? i’ve added after the primary div closure.
Would your fix for Thematic be applicable to TwentyEleven too ?
Thanks for any help
@jerome: If you can see the sidebar but it’s not in the right place then you probably have a CSS issue. I’m not that familiar with TwentyEleven, but typically the main content area and the sidebar are both floated left. If the width of those elements together is greater than the container element, the last element will drop below. Try inspecting the element in Firebug and adjusting the width of the sidebar until both areas float side by side.
If that doesn’t work, WP-Ecommerce may have added an extra element or a
clear: bothrule to an element, which you would have to override in your own CSS file.Hi,
Thanks for the reply.
Actually i’m pretty i know what wrong, i just don’t know how to fix it
The Product pages take on the ‘default template’ for the page attribute, whereas all my other pages are set to the ‘sidebar template’. I find no options of choosing what page template to set the product pages. From my understanding they should inherit the page template of ‘Products page’ but no..
I will try meddling around with the css and see what i can do, or if anybody knows how to target page templates directly ?
Thanks