Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1435222

    As there is a Theme Option in ENFOLD called «Sidebar Einstellungen» unfortunately not for WooCommerce Standard Templates.
    So how can I achieve hiding the Sidebar on WC Standard Pages, like «Produkt-Schlagwörter» (Product Tags) or Produkt-Kategorie (Product Categories) using the Tag Search function like here:
    https://shop.cleanhouse.ch/produkt-schlagwort/4-farbsystem/

    PHP Snippet is not working:
    function disable_woo_commerce_sidebar() {
    remove_action( ‘woocommerce_sidebar’, ‘woocommerce_get_sidebar’, 10);
    }
    add_action(‘init’, ‘disable_woo_commerce_sidebar’);

    Any ideas for PHP Snippet?

    #1435320

    Hey Steve,
    Try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:

    add_filter('avia_layout_filter', 'avia_change_post_layout', 10, 2);
    function avia_change_post_layout($layout, $post_id) {
    	if( is_shop() || is_product_tag() || is_product_category() || is_cart() || is_checkout()) {
            $layout['current'] = $layout['fullsize'];
            $layout['current']['main'] = 'fullsize';
        }
    	if( is_product() ) {
    	$layout['current'] = $layout['fullsize'];
            $layout['current']['main'] = 'fullsize';
        }
        return $layout;
    }

    Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.
    If you are not using a child theme you could use the WP Code plugin then add a new snippet, in the top right corner use the PHP snippet as the code type:
    Enfold_Support_2680.jpeg
    then add the above code and save.

    Best regards,
    Mike

    #1435603

    Works!
    Using «Code Snippets» Plugin
    Thank you.

    #1435615

    Hi,
    Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Hide Sidebar in WooCommerce Standard Template’ is closed to new replies.