Community Forums › Forums › Archived Forums › Design Tips and Tricks › Change header image when I change the language
- This topic has 3 replies, 2 voices, and was last updated 10 years, 2 months ago by
David Chu.
-
AuthorPosts
-
October 5, 2015 at 2:24 am #167415
naiarafernandez
MemberHello,
I need your help.
I'm using Polylang plugin and I would like to change header image when I change the language. So it has to be 2 different languages and 2 different headers at the same time.
I tried to do this (https://polylang.wordpress.com/2013/05/03/a-multilingual-custom-header-image/), but didn't work:
Step 1: create a directory ‘polylang’ in ‘wp-content’ (this is a place where you can store Polylang cutomizations which will not be overwritten when updating Polylang).
Step 2: Copy paste the following code in a file called ‘wpml-config.xml’ that you upload in your ‘wp-content/polylang’ directory:
<wpml-config>
<admin-texts>
<key name='theme_mods_lifestyle-pro'>
<key name='header_image' />
</key>
</admin-texts>
</wpml-config>Step 3: Set an header image in ‘Appearance -> Header’
Step 4: Go to Settings -> Languages -> Strings translations. You can now choose one header image url per language!
I asked to Polylang support and they told me this:
"Your theme does not seem to use the builtin WordPress custom header, theme_mods.
As your theme is not freely available, please contact your theme author for advice."Could you help me to solve the problem?
Thank you in advance
Naiara
http://itsasargia.comOctober 5, 2015 at 12:11 pm #167455David Chu
ParticipantHola Naiara,
Es un problema interesante. 😉 It sounds like your plugin requires that your theme use the Customizer for the header image.Previously Genesis themes used a proprietary setting for the header image. Your theme may be doing that now. I don't have that theme, but it may not be prepared to use the Customizer for the header image.
Pero todavÃa tengo una idea pequeña para Vd. It's done with CSS. Hay un ejemplo aquÃ.
.site-title a:lang(eu) { background: url(http://itsasargia.com/wp-content/uploads/2015/06/imagen-nueva.png) no-repeat !important; }Por supuesto mi ejemplo tiene un imagen imaginario. 😉 First you'll want to upload your image for Euskera somewhere on the server. Then make a note of the path to the file, and use it to replace the file path above. Then add the code to your CSS. Appearance.... Edit.
Yo dirÃa la respuesta completamente en castellano, pero no tengo un vocabulario técnico muy grande. 🙂 I hope my solution is understandable.
Un saludo,
Dave
Dave Chu · Custom WordPress Developer – likes collaborating with Designers
October 5, 2015 at 2:17 pm #167476naiarafernandez
MemberOctober 5, 2015 at 2:48 pm #167478David Chu
ParticipantNaiara,
¡Que bien! Me alegro.Hasta la próxima vez,
Ciao,
Dave
Dave Chu · Custom WordPress Developer – likes collaborating with Designers
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.