Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Now all works I change
    is_product() || is_single() || is_page() || !is_product_category()
    to
    !is_product_taxonomy())
    ———————–
    But now filtest dosent works with “page builder site origen”.

    switch sidebars by if ( is_product() || is_single() || is_page() || !is_product_category())

    I use storefront child theme. In default sidebar yith filter in second category list.
    Second sidebar(storefront_add_new_sidebar) in function.php

    
    
    //----------------------------------------------------------------------------------
    // ------------------------- remove sidebar from single product --------------------
    //----------------------------------------------------------------------------------
    
    add_action( 'get_header', 'remove_storefront_sidebar' );
    function remove_storefront_sidebar() {
      if ( is_product() || is_single() || is_page() || !is_product_category()) {
        remove_action( 'storefront_sidebar', 'storefront_get_sidebar', 10);
        add_action( 'storefront_sidebar', 'storefront_add_new_sidebar');
      }
    }
    
    //----------------------------------------------------------------------------------
    // ------------------------- new_custome_sidebar
    //----------------------------------------------------------------------------------
    
    function register_new_sidebar(){
    
    register_sidebar(array(
        'name' => 'Дополнительный Сайдбар',
        'id' => 'new_custome_sidebar',
        'description' => 'Дополнительный Сайдбар вместо основного',
        'before_title' => '<h3><span>',
        'after_title' => '</span></h3>',
        'before_widget' => '<div class="new-sidebar1">',
        'after_widget' => '</div>'
      )
    );
    }
    add_action( 'init', 'register_new_sidebar' );
    
    function storefront_add_new_sidebar() {
        ?>
        <div id="secondary" class="widget-area" role="complementary">
       <?php dynamic_sidebar('new_custome_sidebar'); ?>   
        </div>
        <?php
    }    
    
    

    without updates all works
    OLD Version:
    https://poyas.com.ua/katalog/razdel/remni-v-dzhinsy?filter_dlinna=90-100

    Its looks like some changes in GET requests

    Yes, I have two. I create in function.php

    //----------------------------------------------------------------------------------
    // ------------------------- remove sidebar from single product --------------------
    //----------------------------------------------------------------------------------
    
    add_action( 'get_header', 'remove_storefront_sidebar' );
    function remove_storefront_sidebar() {
      if ( is_product() || is_single() || is_page() || !is_product_category()) {
        remove_action( 'storefront_sidebar', 'storefront_get_sidebar', 10);
        add_action( 'storefront_sidebar', 'storefront_add_new_sidebar');
      }
    }
    
    //----------------------------------------------------------------------------------
    // ------------------------- new_custome_sidebar
    //----------------------------------------------------------------------------------
    
    function register_new_sidebar(){
    
    register_sidebar(array(
        'name' => 'Дополнительный Сайдбар',
        'id' => 'new_custome_sidebar',
        'description' => 'Дополнительный Сайдбар вместо основного',
        'before_title' => '<h3><span>',
        'after_title' => '</span></h3>',
        'before_widget' => '<div class="new-sidebar1">',
        'after_widget' => '</div>'
      )
    );
    }
    add_action( 'init', 'register_new_sidebar' );
    
    function storefront_add_new_sidebar() {
        ?>
        <div id="secondary" class="widget-area" role="complementary">
       <?php dynamic_sidebar('new_custome_sidebar'); ?>   
        </div>
        <?php
    }    

    wocommerce 3.x.x
    I have the same problem.
    Widgets are not displayed in the sidebar after applying the filter.
    ———————–
    I tryed update at local server. maybe it will help.
    New version:
    poyas.loc/katalog?product_cat=remni-v-dzhinsy&source_id=11&source_tax=product_cat&filter_dlinna=110-115

    Old version, where all works:
    https://poyas.com.ua/katalog/razdel/remni-v-dzhinsy?filter_dlinna=110-115

    Please back 1.1.0.4 ??

    After update to 1.1.0.6 it stops working. I backuped to wp where plugin 1.1.0.4.

    1.1.0.4 work
    1.1.0.6 dose not work
    :((((

Viewing 8 replies - 1 through 8 (of 8 total)