Skip to content

Snippet: Alter The Fixed Header Logo Dynamically

 * Alter the fixed header logo dynamically
 * IMPORTANT: You page must have a default logo defined for "non-fixed" header in order
 * for it to display a logo on the fixed header.
function myprefix_fixed_header_logo( $logo ) {
	// Alter for your homepage
	if ( is_front_page() ) {
		return esc_url( 'YOUR LOGO URL HERE' );

	// Return logo
	return $logo;

add_filter( 'wpex_fixed_header_logo', 'myprefix_fixed_header_logo' );
All PHP snippets should be added via child theme's functions.php file or via a plugin. We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top