[Resolved] Translating hook element changes it into a block hook – WPML

Home Forums Support [Resolved] Translating hook element changes it into a block hook – WPML

Home Forums Support Translating hook element changes it into a block hook – WPML

  • This topic has 3 replies, 2 voices, and was last updated 2 years ago by Ying.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2177870
    Kevin

    I’m adding Facebook pixel tracking to a multilingual website (using WPML). Adding a hook to wp_head works fine on the English side.

    When I duplicate this to create the French translation and add the French pixel, it turns the hook into a block hook, and the only way I can add the code is to treat it as a custom HTML block.

    How can I change a (French language) block hook into a regular hook, like the original?

    Thanks!

    #2177883
    Ying
    Staff
    Customer Support

    Hi Kevin,

    It doesn’t sound right, neither hook element or block element can not be converted to another.

    Can you provide admin access and let us know which hook we should be looking at?

    You can use the private info field for this kind info, it will only be seen by GP support team.

    Please keep all plugins deactivated except GP premium and WPML.

    Let me know ๐Ÿ™‚

    #2178992
    Kevin

    Hi,

    I figured out what was going wrong. When WPML tries to create a translation of a hook element, it turns it into a block hook.

    In order to get the translated element back to the proper type, I had to click the “Overwrite with English Content” when editing the French translation, then translate the item individually rather than through WPML. This forced the element to be the same type as the original.

    Hope this helps someone else who gets stuck on this.

    #2179000
    Ying
    Staff
    Customer Support

    Thanks for sharing this with us ๐Ÿ™‚

    I’m sure it will be useful for other WPML users!

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