Created
October 18, 2017 14:59
-
-
Save JiveDig/582e5400a6cfbe0882419ead44eb2e3c to your computer and use it in GitHub Desktop.
Disable sticky header and shrink header from Mai Pro (https://maipro.io).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Disable sticky header and shrink header from Mai Pro. | |
* | |
* @param array The existing body classes. | |
* | |
* @return array Modified classes. | |
*/ | |
add_filter( 'body_class', 'prefix_disable_mai_sticky_shrink_header', 30 ); | |
function prefix_disable_mai_sticky_shrink_header( $classes ) { | |
// Bail if not the page we want to disable on. | |
if ( ! is_page( 123 ) ) { | |
return $classes; | |
} | |
// Remove the header classes from the array. | |
$classes = array_diff( $classes, array( 'sticky-header', 'shrink-header' ) ); | |
// Return our classes. | |
return $classes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment