Title: Apply filters with javascript
Last modified: August 28, 2022

---

# Apply filters with javascript

 *  [michaelpdi](https://wordpress.org/support/users/michaelpdi/)
 * (@michaelpdi)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/apply-filters-with-javascript/)
 * Hi everyone,
    is there any way to call a filter with javascript? In my example
   I need to select multiple checkboxes. The created link would look like this: /?
   filters=color[blue-red-orange]
 * Greetings Michael

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

 *  Plugin Author [Dmytro Holovnia](https://wordpress.org/support/users/dholovnia/)
 * (@dholovnia)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/apply-filters-with-javascript/#post-15958845)
 * Hi,
 * “call a filter with javascript” – you can initiate a change for any filter value
   to activate it.
 * When page with filter are opened with prefilled filters products must be filtered
   right away.
 * Regards,
    Dmytro
 *  Thread Starter [michaelpdi](https://wordpress.org/support/users/michaelpdi/)
 * (@michaelpdi)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/apply-filters-with-javascript/#post-15959095)
 * Thank you for the quick answer Dmytro Holovnia [@dholovnia](https://wordpress.org/support/users/dholovnia/),
   
   i’m not sure if I understand what you mean. My case is that I would like to apply
   multiple filters after page has loaded already. I have the filters inside my 
   page and I would like to trigger multiple filters at once. Because everytime 
   I apply one filter it is loading some time.
 * Greetings Michael
 *  Plugin Author [Dmytro Holovnia](https://wordpress.org/support/users/dholovnia/)
 * (@dholovnia)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/apply-filters-with-javascript/#post-15959119)
 * Create filter with type `Update Products button` and add it to the sidebar as
   other filters. With this button on the page you can select many filters without
   products loading. Products will be filtered only when button is clicked.
 * Regards,
    Dmytro
 *  Thread Starter [michaelpdi](https://wordpress.org/support/users/michaelpdi/)
 * (@michaelpdi)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/apply-filters-with-javascript/#post-15959153)
 * This is what I needed, thank you a lot [@dholovnia](https://wordpress.org/support/users/dholovnia/)
 * Greetings Michael
 *  Thread Starter [michaelpdi](https://wordpress.org/support/users/michaelpdi/)
 * (@michaelpdi)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/apply-filters-with-javascript/#post-15960711)
 * Hi everyone,
    I have implemted the solution from [@dholovnia](https://wordpress.org/support/users/dholovnia/)
   but with the button now, when I filter in a certain way and there is no results
   it breaks the filter system. I think we will have to do it as it was without 
   the button so the user can’t create a filter combination that leads to no results.
   But we would still need the functionality to enable multiple checkbox filters
   at the same time, is there maybe another solution? Maybe using ajax?
 * Greetings Michael
 *  Plugin Author [Dmytro Holovnia](https://wordpress.org/support/users/dholovnia/)
 * (@dholovnia)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/apply-filters-with-javascript/#post-15968040)
 * Hi,
 * Sorry, but we have no other solution at this time.
 * Regards,
    Dmytro

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

The topic ‘Apply filters with javascript’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-ajax-filters/assets/icon-256x256.gif?rev=2770304)
 * [Advanced AJAX Product Filters](https://wordpress.org/plugins/woocommerce-ajax-filters/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-ajax-filters/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-ajax-filters/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-ajax-filters/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-ajax-filters/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-ajax-filters/reviews/)

## Tags

 * [ajax](https://wordpress.org/support/topic-tag/ajax/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * 6 replies
 * 2 participants
 * Last reply from: [Dmytro Holovnia](https://wordpress.org/support/users/dholovnia/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/apply-filters-with-javascript/#post-15968040)
 * Status: not resolved