Okay
  Public Ticket #953065
After applying a filter widgets are not updated or is not carried out the recount of terms
Closed

Comments

  •  2
    Li started the conversation

    Dear, i have one new problem.

    I bought one plugin, it is not working fine, then i ask them, he said that:

    {

    Hi, 

    you have a problem with your theme sidebar. 
    In register_sidebar function you need to add the ID, like WordPress write on your codex.
    About your website problem you can read this post: https://goo.gl/LvAHyV

    You
    can send the link of this post to theme developers to add the support
    for this. If you want you can send me a copy of your theme for a test
    but the probelm must be fixed from theme developer because I can edit
    the file and solve the issue, but you lost all fix at first theme
    update. 

    Thanks.
    Have a nice day 
    Giuseppe 

    YITH

    Do not forget to follow on Twitter to be updated about our works.

    Thank you!

    }

    here have some information:

    https://support.yithemes.com/hc/en-us/articles/231922648-Ajax-Product-Filter-After-applying-a-filter-widgets-are-not-updated-or-is-not-carried-out-the-recount-of-terms

    {

    Ajax Product Filter - After applying a filter widgets are not updated or is not carried out the recount of terms

    Many users complain that they do not see the filter or reset the widget list is not updated, the problem in most cases is this:

    The problem is in the before_widget arg in register sidebar settings. The correct way to register a sidebar is: 'before_widget' => '<li id = "% 1 $ s" class = "widget% 2 $ s">', with id and class params, like you read in the WordPress Codex . Your theme use only classes and not the id.. Please, look here: https://codex.wordpress.org/Function_Reference/register_sidebar

    That amends must do the theme developer otherwise the first update will lose all changes.

    We advise you to check the configuration of the tab frontend here


    }


    can you help me? thanks


  •  2
    Li replied

    Dear very glad to say that i fix this bug now, according to documentation(wordpress register sidebar).

    Default Usage

    <?php $args = array(
    	'name'          => __( 'Sidebar name', 'theme_text_domain' ),
    	'id'            => 'unique-sidebar-id',
    	'description'   => '',
            'class'         => '',
    	'before_widget' => '<li id="%1$s" class="widget %2$s">',
    	'after_widget'  => '</li>',
    	'before_title'  => '<h2 class="widgettitle">',
    	'after_title'   => '</h2>' ); ?>
    

    now in this theme, it is this:

        # Shop Sidebar
        $shop_sidebar = array(
            'id' => 'shop_sidebar',
            'name' => 'Shop Widgets',

            'before_widget' => '<div class="sidebar-entry %2$s %1$s">',
            'after_widget' => '</div>',

            'before_title' => '<h3 class="sidebar-entry-title">',
            'after_title' => '</h3>'
        );

    here   'before_widget' no id value, and after I add id="%1$s",

            'before_widget' => '<div id="%1$s" class="sidebar-entry %2$s %1$s">',
            'after_widget' => '</div>',

    filter is working fine.


    and i check all register sidebar no id value, I think if this is a small bug, thanks

  • [deleted] replied

    Hi Li,

    We're glad to hear that

    Will set this ticket as solved from here.