skip to Main Content

Conditionally Enable/Disable Overlay Header

// Example 1: Enable everywhere
add_filter( 'wpex_has_overlay_header', '__return_true' );

// Example 2: Conditionally Enable
add_filter( 'wpex_has_overlay_header', function( $return ) {

    // Enable for all pages
    if ( is_singular( 'page' ) ) {
        $return = true;
    }

    // Return bool
    return $return;
    
} );
All PHP snippets should be added via child theme's functions.php file or via a plugin (we recommend Code Snippets)
Back To Top