How to display the Customizr(-Pro) vertical menu only in mobiles

⚠️ Code snippets might not be compatible with the latest version of your theme. Always use a child theme to customize your theme, and test your code on a staging website before migrating to production.

Here’s a simple snippet in order to display the vertical menu only in mobiles, keeping the regular one in desktop devices:

add_filter('tc_opt_tc_menu_style', 'tc_vertical_menu_in_mobiles');
function tc_vertical_menu_in_mobiles( $type ) {
  return wp_is_mobile() ? 'aside' : $type;
}

Where to copy/paste this code?
Add it to your child-theme functions.php.
Everything you need to know about creating a child theme with Customizr here.

Goodbye and goodluck 🙂

Leave a Reply to Menaka S Cancel reply

Your email address will not be published. Required fields are marked *

6 thoughts on “How to display the Customizr(-Pro) vertical menu only in mobiles”