Shortcode or Javascript in topbar content?

I need to use either a shortcode (used by a plugin) or JavaScript in the topbar content, i.e. Pro > Theme Options > Header > Topbar Content.

For JavaScript I want it to run at rendering, in order to generate different HTML depending on (for instance) the URL or the referrer.

How can I do this?

Alternatively, is it possible for PHP code in the topbar content to run at render time? I can work with that also.

Thanks.

Hi @happydogsnyc,

Thank you for reaching out to us. By default the shortcodes or JavaScript do not work in Topbar but with custom development you can enable the shortcodes in the Topbar Content, please follow Shortcode in topbar

Please note that since this is a custom code that changes the default behavior/display of the theme, you will be responsible to maintain or update the code in case you require further changes or if the code stops working in future updates. If you are uncertain how to proceed, it would be best to get in touch with a developer.

Hope this helps!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.