Support » Plugin: Polylang » Random header doesn't work in secondary language

  • Resolved Basili



    I’m having trouble using the ‘Random Header’ feature with my blog. Whenever a page is loaded, one of the possible uploaded header pictures will display. This feature is a part of my theme and it works just fine when I use the default language in English. However, as soon as I switch the language to German, no header image is displayed at all. Because this works in the default language, but not in the secondary language, it seems to be an issue with PolyLang, but of course I can’t be sure. And if I change the theme to use a specific header rather than a random one, both languages work perfectly. Would someone be able to help me figure this one out?

    Thanks, Basil.
    Note: If necessary, here’s the site:
    Note: Using PolyLang version 1.1.3

Viewing 10 replies - 1 through 10 (of 10 total)
  • Does somebody have any ideas?

    This bug is a bit frustrating and any insights would be helpful.

    Could you paste the function that outputs the header?

    Plugin Author Chouby


    Did you try to de-activate the language and translation management for media?

    I figured out what setting you wanted me to disable, so I unchecked it and it’s working now! Thank you! I’m not sure what that does though; will it break any other area on the site?

    Plugin Author Chouby


    This option allows you to set media titles and descriptions in multiple languages. If you don’t use this feature, then it’s safe.

    Oh, I see. I do have every picture in both languages… So I guess this feature is necessary for my blog.

    Is there some other reason the ‘Random Header’ feature won’t work?

    Plugin Author Chouby


    This should work. If you activate the language and translation for media then the random header is logically filtered by language. So you need to have pictures available in all languages. If you have no picture in German, then nothing is outputed.

    The headers show up perfectly when the Random Header is turned off. That means I can pick German and the header shows up correctly on the German page. Doesn’t that mean it’s set correctly? I verified it with a visual inspection in my Media Library – every image is set for both languages. But when I change the headers to random, no header shows up on the German page (although the English headers continue to work).

    Hmmm… I’m stumped, any help would be welcome. Thanks!

    Plugin Author Chouby


    OK. But did you included the translations of your pictures in the header image list?

    One way to check this is to activate the admin language filter (in the menu bar on top of your screen) and check that pictures appear in the custom header setting page for both English and German.

    (I was on vacation…)

    That worked! Although the theme doesn’t show any indication of a change, selecting each translated header image seems to overwrite the default image with both languages. Then I simply set it back to random. The behavior is now what I expect it to be. Thanks for your help.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Random header doesn't work in secondary language’ is closed to new replies.