Support » Plugin: WooCommerce » I can't believe Woo have done this (Default Right side bar)

  • Like I said, I can’t believe they have, so logically it’s something that I’m failing to put right.

    In WP we have a page attribute that allows us to set it at ‘default’ or ‘full width’. Well when I’ve downloaded the Woo Plug In, this attribute doesn’t show, so I’m saddled with a default setting that has a right side bar showing

    Now I’m using right side bars elsewhere in the site, so am a bit nervous about attempting to guess my way round any CSS (and definitely PHP solution). Logically I thought there must be something in ‘settings’ that allows me to put it on full width, but if there is I can’t spot it?

    Now I can’t believe for one second Woo have hard coded something so restrictive as a default right side bar, and surely there must be a very simple 1 minute solution to putting a page on full width.

    I should perhaps say I’m using the Plug In, and not a Woo theme. The only time I tried to integrate a Woo theme with a web site theme was a complete disaster as they went into conflict and I lost about 2 days work having re-enter all the navigation again, so I’m a bit nervous about bringing a Woo theme in ever since.

    Any help, as always, appreciated folks

Viewing 15 replies - 1 through 15 (of 22 total)
  • Not 100% sure what you mean, but when you go to your shop page, there’s a widget called ‘Options of page’ and in it one of options says ‘Layout Page’ which you can set to no sidebar/left sidebar/right sidebar, is that what you’re looking for?

    EDIT: Never mind actually I based that on what I have, which is most likely a theme that I’m using feature, rofl. Sorry. Problem stays.

    Anyway, think you will need to use hooks to change templates layout, or change the templates themselves, but I’m no guru in that topic just yet, so gonna leave it for someone smarter!

    It feels as if it should be something that straight-forward Kramarz, but I think as you’ve worked out, it might not be.

    The shop page is one that can be set at full width using the normal page attribute, but doing this seems to make no difference to the display. The option to set the product pages at full width doesn’t exist with no page attribute box showing in order to make that setting. Even if there were, you suspect it wouldn’t work aka the shop page

    There are a few widgets that have come in from the plug in, but I’m not sure what they are or what they can do

    It looks pretty ugly as things stand though

    Terrified as I am to perform anything that involves PHP, I did have a tentative dig in the PHP template file called main.woocommerce and found this little item, which my extremely limited understanding of such issues would lead me to conclude that some default sidebar has indeed been coded into the plug-in

    <!– SIDEBAR –>
    <div class=”sidebar”>

    {dynamicSidebar “shop-sidebar”}

    </div><!– end of sidebar –>

    Now I want sidebars to appear elsewhere in the site and have had to use a plug-in to support this due to limitations in the theme, but I don’t want them on the Woo pages

    I guess there’s two questions really:

    1: Is this PHP the offender that’s causing a side bar to display?
    2: How do I disable it safely?

    I’m sure there’s something you can do involving /* or */ isn’t there? If that’s right? where abouts would you wrap it round the PHP?

    Roy Ho


    Put this in your themes functions.php file.

    remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 );

    Thankyou, something tells me this might do the trick, but before I do, (and at great risk of inviting a very easy one-liner!!) is there any specific space I need to put it?

    I should clarify,

    you’ve specified ‘theme function’ so I’m not to put it in the woo.commerce PHP file? OK that bit I understand, but I was always under the impression you couldn’t go round putting PHP in anywhere in a theme a file, and that it had to put in an appropriate location? is that right? or can I just put it anywhere like I might customised CSS?

    Roy Ho


    It can go anywhere in the theme’s functions.php file…

    Roy Ho


    Don’t be scare of your own site…best way to learn is just do it…if it breaks great, now you know better and learn from it…

    Ok I tried it, but it hasn’t worked.

    Hasn’t crashed anything either, so that’s a relief

    Roy Ho


    If it doesn’t work then that means it is not WC’s sidebar you’re trying to get rid of, its your other sidebars probably from your theme.

    The code I gave you is specific to WC and will not work if your theme or any other plugin is adding the sidebar in. For those you need to look at the code from them to know how to remove it on shop pages.

    Bear with me, I’ll see if I can find it.

    It did seem strange that Woo would put something like a sidebar in without an easy way of removing it.

    I’m assuming it’s come with the plug-in then (which also seems to have disabled the visual editor too)

    Roy Ho


    No it is NOT WC’s fault. The person who is building the site with WC SHOULD know what he/she is doing and it involves knowing actual code and how it works.

    I can’t spot any evidence of the plug in in the functions PHP file.

    Let me try and explain a bit and see if it helps (i might accidentally throw light on something significant)

    I’ve had to use a plug-in called ‘custom sidebars’ by Javier Marquez, due to limitations of a theme that I haven’t been particularly impressed with. This worked anyway, and I was able to set indvidual pages with discretion, at either template (sidebars) or full width, as normal in the WP page attribute. Critically I had the capacity to mix and match my pages to display a sidebar or otherwise, and this is the capacity I seem to have lost for the Woo pages

    When I brought the Woo commerce plug into the site everything went reasonably smoothly with the exception of this display issue. Only the Shop page offers me the page attribute setting though through WP, it simply doesn’t appear as an option for the product pages which is where the damage is being done (I think)

    Even though the shop page is set at full-width, its displaying the default though with an unpopulated side bar

    Roy Ho


    You should turn off that sidebar plugin and use the code I mentioned above to see if that combination works for you.

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘I can't believe Woo have done this (Default Right side bar)’ is closed to new replies.