[Woocommerce] Woocommerce Shop Page Template

https://www.fondazionechiro.it/negozio/

Why I cant put the sidebar on the same row of products list in the shop page? Also in the categories pages the sidebar is always too deep down.

I tried to edit archive-product.php but looks like it isn't overwritten in child theme dir.

I start thinking it could be a woocommerce issue, related to the plugin (standalone) installed and the bulk plugin I can find in the educationpress theme dir.

I noticed that <div id="secondary" class="widget-area col-xs-12 col-sm-4"> is INSIDE the <main> and if I put it OUTSIDE the <main> it works fine. But I cannot do that!

Please help me.

V

  • Kasia Swiderska
    • Support nomad

    Hello Vincenzo,

    I checked code of that page and this issue is because div id="content" has missing class of bootstrap – and because there is no class it is filling all the available space.

    Right now structure looks like that:

    [attachments are only viewable by logged-in members]

    <main id="main" class="site-main col-xs-12 col-sm-8">
    <div id="primary" class="content-area">(...)</div>
    <div id="secondary" class="widget-area col-xs-12 col-sm-4" role="complementary">(...)</div>
    </main>

    where it should look like this:

    <main id="main" class="site-main col-xs-12">
    <div id="primary" class="content-area col-sm-8">(...)</div>
    <div id="secondary" class="widget-area col-xs-12 col-sm-4" role="complementary">(...)</div>
    </main>

    so class col-sm-8 was moved to div primary from the main div.

    kind regards,

    Kasia

  • Kasia Swiderska
    • Support nomad

    Hello Vincenzo,

    Here is plugin https://wordpress.org/plugins/show-current-template/ that will show you what templates are used on this particular page – then you will need to check those files in your theme and see which one has lines I posted above.

    Then you can copy that file to child theme to correct those classes – and I suggest sending info to theme authors https://themecycle.com to correct the theme code on their site.

    let me know if you need further assistance.

    kind regards,

    Kasia

  • Kasia Swiderska
    • Support nomad

    Hello Vincenzo,

    Looks like there is more complex code in your theme – if your theme developer didn’t fix that for you I can take a look, however, because it is the third party theme we might not be able to do that if it will require a lot of rewriting.

    If you can please zip parent and child theme you are using and put it on service like Dropbox and send me a link to it via our contact form https://wpmudev.com/contact/#i-have-a-different-question and the template below:

    Subject: “Attn: Kasia Swiderska

    – Link to theme

    – Link back to this thread for reference

    – Any other relevant urls/info

    IMPORTANT: Please make sure you select “I have a different question” for your topic, so it doesn’t go back to the forums – this and the subject line ensure that it gets assigned to me.

    [attachments are only viewable by logged-in members]

    Please confirm here that you send those

    kind regards,

    Kasia

  • Kasia Swiderska
    • Support nomad

    Hello Vincenzo,

    Thanks for sending this theme, but unfortunately I wasn't able to change the code in the way it would fix the issue with the sidebar as templating there is divided into many places and it's way too time-consuming for the third-party theme.

    I must strongly suggest talking with theme developer – I tested that theme on my site and it's also not working correctly there.

    But I was able to prepare a workaround for it that made it work. It is using JS and that is the script:

    jQuery(document).ready(function( $ ){
    if ( $('body').hasClass('post-type-archive-product') )
    {
    $('main.site-main.col-xs-12').removeClass('col-sm-8');
    $('main.site-main.col-xs-12 div#primary').addClass('col-sm-8');
    };
    });

    I have added it using this plugin https://wordpress.org/plugins/custom-css-js/ (Custom JS)

    [attachments are only viewable by logged-in members]

    – but that is workaround and developer should take a look on this theme because it should not break this way even on default, simple Woo installation without anything added like on my site.

    kind regards,

    Kasia

  • Vincenzo
    • WPMU DEV Initiate

    Tyvm Kasia, you did a wonderful job with this js! It works and I’ll keep it active.

    Theme support is not as I expected, they don’t answer and cannot solve the issue. Unbelievable.

    Have a nice day, hoping to meet you again.

    Vincenzo