Hi. How can we help?

How to have closed dropdown filters on mobile

If you want to have product filter widgets closed by default only on mobile, you can add the following few lines of code in your theme functions.php file, which should be placed in /wp-content/themes/THEMENAME/functions.php
Please be careful with the opening and closing php tags inside that file.
add_filter( 'yith_wcan_dropdown_type', 'yith_wcan_dropdown_type' );
function yith_wcan_dropdown_type( $dropdown_style ){
return wp_is_mobile() ? 'close' : $dropdown_style;
Was this article helpful?
2 out of 14 found this helpful

Back to Help Center >