Snippets: 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' );

Snippet Type: PHP

Posted Under: Header

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