Hello,
I know that Cardinal supports WPML but with the functionality I am looking for is not available within Cardinal and requires code added to the header.php/alt-header.php files. I’ve been given this piece of code by WPML so when the language switches so will the logo (each language has a logo in that language). There is some swift framework involvement when I look into the header.php/alt-header.php so I was wondering if you could guide me on the best place to add this so it integrates with Cardinal.
Here is my support case with WPML if that helps: https://wpml.org/forums/topic/logo-change-in-language-cardinal-theme/
<div id="logo">
<?php
// Website heading/logo and description text.
if(ICL_LANGUAGE_CODE=='en'){
$site_url = "SITE_URL";
$site_description = "SITE_DESCRIPTION";
$site_title = "SITE_TITLE";
$logo = "PATH_TO_YOUR_ENGLISH_LOGO";
}
elseif(ICL_LANGUAGE_CODE=='fr'){
$site_url = "SITE_URL";
$site_description = "SITE_DESCRIPTION";
$site_title = "SITE_TITLE";
$logo = "PATH_TO_YOUR_FRENCH_LOGO";
}
echo '<a href="' . $site_url . '" title="' . $site_description . '"><img src="' . $logo . '" alt="' . $site_title . '" /></a>' . "\n";
?>
</div><!-- /#logo -->