Archived topic
Mobile Header and Polylang Plug-in: different logo for different languages
5 replies · Started by Antonio on October 10, 2018
Hi :)
On this website built with GeneratePress Premium (NOT a child theme) I would like to have a different Header Logo for the English website.
I was able to fix it for the "Desktop Version" like this
<wpml-config>
<admin-texts>
<key name="theme_mods_generatepress">
<key name="custom_logo" />
</key>
</admin-texts>
</wpml-config>
But I don't know how to do it for the Mobile Header :(
Any tips?
Thanks!!!
PS: if you want to know how it works for the Desktop Logo here the step by step guide :)
1. Create a folder called "polylang" in wp-content
2. Create a wpml-config.xml" file with the following code:
<wpml-config>
<admin-texts>
<key name="theme_mods_generatepress">
<key name="custom_logo" />
</key>
</admin-texts>
</wpml-config>
3. Place this file in the "polylang" folder you created before
4. In the WP Dashboard go to Languages -> String Translations.
Once there on top filter for "Polylang" strings.
5. Define for the Languages you have different IDs. Those IDs are the ID of the 2 logo files you have in your media gallery.
(To find out the ID of the logos simply goes in the Media Gallery, go with the mouse over the logo and in the status bar of your browser you'll see the ID of that media object.)
6. Adjust the ID in the Languages -> String Translations
Hi there,
You should be able to add this key:
<key name="generate_menu_plus_settings">
<key name="mobile_header_logo"/>
</key>
Thanks for sharing the instructions for setting this up! :)
Hi Tom,
I tried as you said but I end up having no Mobile logo in the header for the English language.
I tried both by defining the ID of the logo and also the SVG directly in the Strings.
Really strange :(
Hi Tom,
I found it out :)
Something in your suggestion was missing. Here the complete code for Desktop and Mobile Header
<wpml-config>
<admin-texts>
<key name="theme_mods_generatepress">
<key name="custom_logo" />
</key>
<key name="generate_menu_plus_settings">
<key name="mobile_header" />
<key name="mobile_header_logo" />
</key>
</admin-texts>
</wpml-config>
Thanks again :)
Awesome, thanks for sharing the code! :)