Snippets: Conditionally Enable/Disable Overlay Header

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

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

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

    // Return bool
    return $return;
    
} );

Snippet Type: PHP

Posted Under: Header

All PHP snippets should be added via a child theme's functions.php file.