Viewing 6 replies - 1 through 6 (of 6 total)
  • Please post the url to a relevant page.

    …or at least the theme’s name?
    That would greatly help to get your question answered.

    Thread Starter dicassp

    (@dicassp)

    I am sorry Iorro and Brad, I forgot to put the link.

    Here is the link for my products page:

    https://www.dicassaopaulo.com.br/lojinha/

    My theme is SimpleMag from Theme Forest. Unfortunately, this theme doesn’t have a woocommerce integration, so I had to integrate it using the third party, editing php.

    The woocommerce is working completely fine. I just need to remove the sidebar from the products page.

    My theme allows me to set the sidebar per page, and it is set to not display the sidebar, but it keeps showing it. That’s why I think it may be something related to woocommerce.

    I just want to be able to show the sidebar for the products, example: size, colour…

    Thank you very much!

    Try this in functions.php.

    remove_action( 'woocommerce_sidebar', 'woocommerce_sidebar' );

    If it works, note that functions.php will be overwritten by theme updates. To get round this you will need to make a child theme:
    https://codex.www.ads-software.com/Child_Themes
    and put the code in functions.php for the child theme.

    Ensure the php interpreter is on. If necessary you can turn it on like this:

    <?php
    remove_action( 'woocommerce_sidebar', 'woocommerce_sidebar' );

    If its removal leaves a big space, that can be dealt with separately.

    Thread Starter dicassp

    (@dicassp)

    Hi Iorro,

    It didn’t work out ??

    Any other idea?

    Give me a few and I’ll see if I can type this up better, but….

    if page template = product page {

    unset sidebar

    }

    That’s not the actual code, but hopefully someone else will jump back in ’till I get back.

    ….wait, Did you ask the theme authors in their support forum?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘REMOVE SIDEBAR’ is closed to new replies.