skip to Main Content

Site-Wide Overlay Header Style and Page Header Background Image

// Enable overlay header site-wide
add_filter( 'wpex_has_overlay_header', '__return_true' );

// Overlay header style
add_filter( 'wpex_header_overlay_style', function( $style ) {
	$meta = get_post_meta( get_the_ID(), 'wpex_overlay_header_style', true );
	return $meta ? $meta : 'dark';
} );

// Change the page header style
add_filter( 'wpex_page_header_style', function( $style ) {
	return 'background-image';
} );

// Change the page header background image
add_filter( 'wpex_page_header_background_image', function( $image ) {
	return 'YOUR IMAGE URL';
} );
All PHP snippets should be added via child theme's functions.php file or via the Code Snippets Plugin (or alternative plugin)
Back To Top