[Resolved] Multilingual Hook Message

Home Forums Support [Resolved] Multilingual Hook Message

Home Forums Support Multilingual Hook Message

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1260248
    Christian

    Hello, GP Team!

    Plugin: Polylang
    Element: Hooks

    There’s a message I want to display before all my blog posts using Hooks, however, I would like this message to be different for Spanish and English blog posts

    For example, I would like all my English blog posts to display “Tom is the Best,” and all my Spanish posts “Tom es el Mejor.”

    I’m having a little trouble setting up the Display Rules.

    Thanks in advance!

    #1260257
    Leo
    Staff
    Customer Support

    Hi there,

    Something like this should help:
    https://generatepress.com/forums/topic/bug-elements-and-display-rules-and-wpml-wpml-global-locations-bug-ongoing/#post-662746

    You would need to use generate_hook_element_display instead of generate_header_element_display:
    https://docs.generatepress.com/article/generate_hook_element_display/

    #1260374
    Christian

    Thank you so much, Leo, you’re cool!

    I was able to achieve it by simply setting the translation with Polylang. heh

    #1260435
    Leo
    Staff
    Customer Support

    That’s awesome.

    Any chance you can provide a little more details on how you did it?

    It would certainly help other users.

    Thanks!!

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