Snippet: Custom Logo Per Language
// IMPORTANT - If you are using WPML you can change your logo via the string translation function
// This snippet is intended for other language plugins that don't support translating theme_mods
// or if you prefer to use code
add_filter( 'totaltheme/header/logo/image_id', function( $image ) {
// Spanish logo URL for WPML
if ( defined( 'ICL_LANGUAGE_CODE' ) && 'es' == ICL_LANGUAGE_CODE ) {
$image = 'YOUR CUSTOM IMAGE ID';
}
// Return logo image
return $image;
} );
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)
We recommend Code Snippets (100% Free) or WPCode (sponsored)