Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am developing a refresh of my site on a new VPS plan and on of the main changes is switching from the dreaded wp e-commerce to WooCommerce.

The URL to the WooCommerce store page is [I am accessing the site via the VPS IP address for now as my domain is being used for the live site - StackExchange doesn't allow IP URLs so you'll need to copy-paste the IP to your address bar (sorry)]

I am still in the process of styling and templates but I can't seem to figure out the sidebar. My WordPress theme has 2 sidebars defined in its functions.php: blog sidebar and shop sidebar. For some reason the only sidebar I can get to show on the store page is the blog sidebar which is only meant to show (surprisingly) on the blog.

I tried creating a template for the store and inserted the get_sidebar() function, referring to the ID of the shop sidebar in the process, but no joy.

I am of the belief that WooCommerce should register its own sidebar when installed but there is no sign of this in the WP backend under appearance->widgets.

I have trawled through the WooCommerce theme files but the only sidebar-related thing I can find is a php file containing get_sidebar('shop') which is obviously included by other theme files. There is no sign of a sidebar with ID 'shop' being registered anywhere.

Any idea how I can get the correct sidebar showing on the shop pages? Thanks

I see my question has been downvoted a couple of times - I'm sorry if it's unclear but it is a genuine question. If anything needs clarifying it would help if you left a comment rather than just downvoting.

share|improve this question
How about using Woo Support routes? –  kaiser Nov 20 '12 at 12:52
add comment

4 Answers

WooCommerce have a sidebars plugin: http://www.woothemes.com/woosidebars/

This will give you really comprehensive control- you can create new sidebar areas for whatever pages you like.

share|improve this answer
That could be an option but I'd rather avoid installing extra plugins when I can acheive the result in my theme. I just want to get to the bottom of why I can't seem to get my second shop sidebar to display. Does WooCommerce always use the index.php template or do the WC pages obey the templates they are given? –  harryg Nov 20 '12 at 10:09
add comment

WooCommerce will by default look in your theme directory for a page template named woocommerce.php and if it exists will use that template when it renders a page. This way you can override the default WooCommerce page in an upgrade safe way.

The easiest way to implement this is to copy your page.php or single.php to woocommerce.php (in the same directory) then edit the file to replace the content area with a call to WooCommerce.

<?php woocommerce_content(); ?>

This gives you and the theme nearly complete control over the layout and sidebars.

Take a look at this post on themeing WooCommerce, hopefully this will be helpful to you.

WooCommerce Template Structure

share|improve this answer
Edited to explain use of custom woocommerce.php file within the theme to allow total control over sidebars. –  Stephen Nov 21 '12 at 16:10
add comment

FINALLY!! I found an answer to a similar problem I was encountering with the Customizr theme. See it here.

Essentially, you easily create a custom sidebar, that is edited in Appearance > Widgets and will only show up in your shop pages.

Note: When following the example in this link, be sure to add <?php to the beginning of the code that makes up the sidebar-shop.php file.

Hope this helps you as much as it did me.

share|improve this answer
add comment

First step

Copy the woocommerce template files from your plugin into your theme folder (detail how to override default theme http://docs.woothemes.com/document/template-structure/)

Second Step

Create sidebar-shop.php in your theme folder

Third step

Add some text or echo string inside your sidebar-shop.php.

Fourth step

Refresh site you will see the default text string start displaying instead of default blog content

You can further customise your side bar as you want (detail http://codex.wordpress.org/Function_Reference/register_sidebar)

In the widget area add productcategory in the defined sidebar So now in your sidebar you will see product categories instead of default sidebar blog content

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.