Archived topic
Multilingual Hook Message
3 replies · Started by Christian on April 28, 2020
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!
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/
Thank you so much, Leo, you're cool!
I was able to achieve it by simply setting the translation with Polylang. heh
That's awesome.
Any chance you can provide a little more details on how you did it?
It would certainly help other users.
Thanks!!