Title: Activate filter button.
Last modified: August 10, 2023

---

# Activate filter button.

 *  [elsevi](https://wordpress.org/support/users/elsevi/)
 * (@elsevi)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/activate-filter-button/)
 * I need the filter button to activate the off canvas, to be active also for the
   desktop version. Is it possible to do so? Thank you

Viewing 1 replies (of 1 total)

 *  [crodriguez1991](https://wordpress.org/support/users/crodriguez1991/)
 * (@crodriguez1991)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/activate-filter-button/#post-16965267)
 * Hello there,
 * I hope you’re doing well 😀
 * If you want to show the mobile filters also for desktop, try to add the following
   code in the functions.php of your active theme
 *     ```wp-block-code
       if( ! function_exists( 'yith_wcan_get_mobile_media_query' ) ){ 
       function yith_wcan_get_mobile_media_query(){ 
       return 99999; 
       } 
       } 
   
       if ( ! function_exists( 'yith_wcapf_change_script_args' ) ) { 
       function yith_wcapf_change_script_args( $args ) { 
       $args['mobile_media_query'] = yith_wcan_get_mobile_media_query(); 
       return $args; 
       } 
       add_filter( 'yith_wcan_shortcodes_script_args', 'yith_wcapf_change_script_args', 10, 1 ); 
       } 
   
       if( ! function_exists( 'yith_wcan_change_media_query_style' ) ){ 
       function yith_wcan_change_media_query_style(){ 
       $mobile_media_query = yith_wcan_get_mobile_media_query(); 
       $handle             = 'yith-wcan-shortcodes'; 
       $css                = '@media( max-width: 991px ) { 
       body.filters-in-modal .yith-wcan-filters { 
       display: block; 
       } 
       } 
       @media( max-width: ' . $mobile_media_query . 'px ) { 
       body.filters-in-modal .yith-wcan-filters { 
       display: none; 
       } 
       }'; 
       wp_add_inline_style( $handle, $css ); 
       } 
   
       add_filter( 'wp_enqueue_scripts', 'yith_wcan_change_media_query_style', 99 ); 
       }
       ```
   
 * Please, try it and let me know.
 * Have a good day.

Viewing 1 replies (of 1 total)

The topic ‘Activate filter button.’ is closed to new replies.

 * ![](https://ps.w.org/yith-woocommerce-ajax-navigation/assets/icon-256x256.gif?
   rev=3129944)
 * [YITH WooCommerce Ajax Product Filter](https://wordpress.org/plugins/yith-woocommerce-ajax-navigation/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yith-woocommerce-ajax-navigation/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yith-woocommerce-ajax-navigation/)
 * [Active Topics](https://wordpress.org/support/plugin/yith-woocommerce-ajax-navigation/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yith-woocommerce-ajax-navigation/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yith-woocommerce-ajax-navigation/reviews/)

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [crodriguez1991](https://wordpress.org/support/users/crodriguez1991/)
 * Last activity: [2 years, 9 months ago](https://wordpress.org/support/topic/activate-filter-button/#post-16965267)
 * Status: not resolved