[Resolved] Header Element and WPML

Home Forums Support [Resolved] Header Element and WPML

Home Forums Support Header Element and WPML

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1448358
    Gary

    I have setup a Hero Header with GP Elements and it all works fine. The setting include Merge and Full Screen image.

    I have 3 lines of text in the Hero Header.

    As I am using WPML, these 3 lines need translating. That is the easy part. The Elements can be translated using WPML. I have done that. But the problem is that my ‘Full Screen’ settings don’t work in the translated language.

    This is what is looks like in Engish:
    https://www.ipohgo.com/

    This is what it looks like in Chinese:
    https://www.ipohgo.com/zh-hans/

    #1448595
    David
    Staff
    Customer Support

    Hi there,

    thats odd – simplest fix would be to add full-height to the Element classes field in the Header Element. Then add this CSS:

    .page-hero.full-height {
        min-height: 100vh;
    }
    #1450491
    Gary

    Hi David,

    Thanks for this, but sadly it didn’t work. Nothing has changed:

    https://www.ipohgo.com/zh-hans/

    #1450801
    David
    Staff
    Customer Support

    I am not a WPML user – does it require you to create a separate Element for each language?

    #1450812
    Gary

    No, WPML doesn’t require that. All the element/post/page settings are supposed to stay the same, and other than this particular case, that is exactly what happens throughout my site.

    It’s very odd.

    I’ve inspected the page and I note that the code is different but I can’t understand why.

    On my English language page, it is:

    <div class="page-hero hide-on-mobile full-height" style="background-position-y: 0px;">

    But on my Chinese-language page it is:

    <div class="page-hero hide-on-mobile">

    It’s using exactly the same element, so I don’t understand why the height and style are being removed.

    #1450823
    Gary

    Hi David,

    I have finally resolved it.

    WPML has a set of ‘system fields’ for each page/post/element etc. These are usually not touched but I have just inspected them and noticed there was a system field titled ‘_generate_hero_full_screen’ that was set to ‘Don’t Translate’. I changed the setting to ‘Copy’ and hey presto, it now works.

    I have put this info here in case it happens to another GP user in the future.

    #1450866
    David
    Staff
    Customer Support

    Awesome – yeah i am sure we have answered this type of query before ( Tom normally deals with translations ) – thanks for sharing, at least i have an idea where to direct WPML users in the future.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.