-
Anonymous
Hi,
Is there any way to place an SVG icon in the top header menu that, when clicked, opens a popup window displaying the WPML switcher? I tried adding it to the top header menu next to the search icon using my custom code (as an HTML/JS element), but for some reason the JavaScript in the header is blocked and the popup doesn’t work.I’m trying to create the WPML switcher according to the example — see the attached image.

Thank you
-
Hi there,
Do you have GB Pro? If so, it has the overlay panel feature, which allows you to create a popups.
https://learn.generatepress.com/blocks/block-guide/pop-ups-modals/If not, then it requires custom development and it’s out the scope, unfortunately!
-
Anonymous
Hi Ying,
when I place custom code at the end of the navigation in the header that calls a modal popup (I place the JavaScript in the footer), for some reason, something is blocking this JavaScript. That’s why I’m reaching out to you as support, to see if you can advise me on what might be causing this.You’re directing me to your other product, GB Pro, which, if I purchase, might solve my problem. But I’m not willing to pay just to get my custom JavaScript called from the header to work.
To be honest, I’m a bit mixed up by your response. In the meantime, I created the modal window using a CSS hover, which has compensated for the solution with JavaScript.
-
Alvind
Hi there,
There could be several reasons why the JS isn’t working — one common cause is caching settings if you have a caching plugin or server cache enabled.
Can you check your browser console while testing the popup script? If there’s an error message there, it might give us a clue about what’s preventing it from working.
- You must be logged in to reply to this topic.