Title: Filter without Button
Last modified: November 2, 2016

---

# Filter without Button

 *  Resolved [lschuerg](https://wordpress.org/support/users/lschuerg/)
 * (@lschuerg)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/filter-without-button/)
 * Hey, is it possible to automatic filter when you choose a taxonomy, without the
   need to click on apply button?
 * Thanks a lot,
    Laszlo

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

 *  [francescor](https://wordpress.org/support/users/francescor/)
 * (@francescor)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/filter-without-button/#post-8474335)
 * This definitely is something I would be interested in too.
 *  [eqhes](https://wordpress.org/support/users/davidcs66/)
 * (@davidcs66)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/filter-without-button/#post-9246592)
 * Surely you solved this, but in case anyone else is looking for how to do this:
 * 1) Create a custom.js file inside your theme folder with this code (remember 
   to change IDs with your own):
 *     ```
       jQuery(document).ready(function(){
   
       	jQuery('#your_select2_select_id').on('select2:select', function (evt) {
       		jQuery('#your_select2_form_id').submit();
       	});
   
       });
       ```
   
 * 2) Load custom.js from your functions.php like this:
 *     ```
       add_action( 'wp_enqueue_scripts', 'my_custom_script_load' );
       function my_custom_script_load(){
         wp_enqueue_script( 'my-custom-script', get_stylesheet_directory_uri() . '/custom.js', array( 'jquery' ) );
       }
       ```
   
 * 3) Hide the “apply filters” button within your style.css file or the custom CSS
   box in the plugin’s control panel:
 *     ```
       .beautiful-taxonomy-filters-button {
       	display: none;
       }
       ```
   
 * 4) Enjoy! 😉
 *  Plugin Author [Jonathan de Jong](https://wordpress.org/support/users/jonathandejong/)
 * (@jonathandejong)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/filter-without-button/#post-9247191)
 * Thank you Eqhes for the short tutorial.
    I will not implement this option in 
   core (at least not in the basic version) since it essentially means you have 
   to load the page with each selection which would only really make sense if you
   have but 1 taxonomy. And in that case you’d might as well use wp_dropdown_categories
   right in the theme.
 * Should perhaps also note that anyone using the code above have to change the “#
   your_select2_select_id” in the jquery selector.

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

The topic ‘Filter without Button’ is closed to new replies.

 * ![](https://ps.w.org/beautiful-taxonomy-filters/assets/icon-256x256.png?rev=3655231)
 * [Beautiful taxonomy filters](https://wordpress.org/plugins/beautiful-taxonomy-filters/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/beautiful-taxonomy-filters/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/beautiful-taxonomy-filters/)
 * [Active Topics](https://wordpress.org/support/plugin/beautiful-taxonomy-filters/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/beautiful-taxonomy-filters/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/beautiful-taxonomy-filters/reviews/)

## Tags

 * [select2](https://wordpress.org/support/topic-tag/select2/)
 * [taxonomy](https://wordpress.org/support/topic-tag/taxonomy/)

 * 3 replies
 * 4 participants
 * Last reply from: [Jonathan de Jong](https://wordpress.org/support/users/jonathandejong/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/filter-without-button/#post-9247191)
 * Status: resolved