WordPress.org

Ready to get started?Download WordPress

Forums

Polylang
[resolved] Random header doesn't work in secondary language (11 posts)

  1. Basili
    Member
    Posted 1 year ago #

    Hello,

    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: http://www.noqualm.com/
    Note: Using PolyLang version 1.1.3

    http://wordpress.org/plugins/polylang/

  2. Basili
    Member
    Posted 1 year ago #

    Does somebody have any ideas?

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

  3. moreyummystuff
    Member
    Posted 1 year ago #

    Could you paste the function that outputs the header?

  4. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

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

  5. Basili
    Member
    Posted 1 year ago #

    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?

  6. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

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

  7. Basili
    Member
    Posted 1 year ago #

    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?

  8. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  9. Basili
    Member
    Posted 1 year ago #

    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!

  10. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  11. Basili
    Member
    Posted 12 months ago #

    (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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic