How to make Spotlight Categories filter not multiple

Solved4 replies3 participantsUpdated by Tony Rodriguez

  • Avatar: Dabbas
    Dabbas
    Participant

    I modified the Products Archive template and added a categories widget named “Spotlight Categories” and “Products Grid”, now the filtering is working when I click on a category but it’s appending the categories not replacing, for example:
    I clicked on Cat A, I see in the URL it’s ‘…?filter_cat=cat-a’ , then I clicked (on the new cat A page) on Cat B, the parameter will become: ‘…?filter_cat=cat-a,cat-b’ .. It appends the filters, I need it to replace cat-a filter with cat-b, how can I do this ?

    4 Answers

    Avatar: Jack Richardson
    Jack Richardson
    Support staff

    Hello @Dabbas,

    Please insert the following snippet into your child-theme/functions.php file:
    add_filter('etheme_dynamic_categories_filter_cat_merge', '__return_false');

    Should you require further assistance or have any questions, please do not hesitate to contact us.

    Kind regards, Jack Richardson
    The 8theme’s team

    Avatar: Dabbas
    Dabbas
    Participant

    It’s working, thanks, but I think this should be part of the widget it self.

    Avatar: Dabbas
    Dabbas
    Participant

    Thanks for the support! My topic “How to make Spotlight Categories filter not multiple” has been successfully resolved.

    Avatar: Tony Rodriguez
    Tony Rodriguez
    Support staff

    Dear Dabbas,

    Thanks for being part of our WordPress & WooCommerce community!

    We’re happy we could assist you. Your feedback truly matters — it helps us make XStore better, faster, and more reliable with every release.

    Together, we’re shaping a better WooCommerce experience for everyone.

    Topic closed.
    The 8Theme Team

The issue related to '‘How to make Spotlight Categories filter not multiple’' has been successfully resolved, and the topic is now closed for further responses