Disable Customizr(-Pro) sticky header in mobiles

The sticky header is a cool feature we all love :). Though we might find it useful just in desktop browsers and we would like to keep the static header in mobiles.

Here’s a simple snippet to add to your child-theme functions.php in order to achieve that.

add_filter('tc_opt_tc_sticky_header', 'disable_sticky_in_mobiles');
function disable_sticky_in_mobiles( $bool ){
  return $bool && ! wp_is_mobile();    


This snippet just uses one of the large amount of the filters Customizr and Customizr-Pro provide plus a Wordpress’ built-in function which checks whether or not you’re visiting the site on a mobile device (tablet included).

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

5 thoughts on “Disable Customizr(-Pro) sticky header in mobiles”

Comments are closed.