• Resolved simco

    (@simco)


    We’re using the Divi theme and a special plugin that provides the ability to customize the header(s) ( Divi Ultimate ). Your shortcode works fine in the sidebar, and works fine if I place it anywhere in the body area. But it won’t work in the header area. We’ve tested other plugin shortcodes and they work fine in the header. The Divi Ultimate tech say it’s not an issue with the header since other shortcodes work fine. Please advise how we can fix this issue.

    The page I need help with: [log in to see the link]

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Prisna

    (@prisna)

    Greetings,

    you should know what you can only have one translator per page. So make sure to add it in that special header only.

    If still doesn’t work, leave in that place so it’s possible to take a look.

    Regards

    Thread Starter simco

    (@simco)

    Thanks for the quick response. OK, i’ve removed all other incidents of the widget including from the sidebar and inserted the shortcode into the custom header only. It should display in the area to the right of the 30 Day Guarantee at the top of the page. But, it doesn’t. This is the mystery. It displayed when I inserted it into the body of this page. But it won’t display in the header. Please advise.

    https://tempsiteone.com/store/ is the specific page

    Plugin Author Prisna

    (@prisna)

    For some reason there’s no HTML code from the translation plugin in that location, nor in any other place. Please place a test shortcode before and after the translation shortcode.

    Also make sure nothing is selected in:

    Advanced > General > Hide on pages, posts and categories

    Thread Starter simco

    (@simco)

    OK, i’ve placed two shortcodes in the same location, one above yours and one below yours. Both are cart displays but from different plugins. One is the woo cart display, the other is a shortcode from the theme for displaying the cart icon. Your shortcode is sandwiched in between.

    I also checked and there’s no pages checkmarked to be hidden.

    Have a look.

    • This reply was modified 4 years, 2 months ago by simco.
    Plugin Author Prisna

    (@prisna)

    There are no “carts”. The location is empty:

    Screenshot

    Make sure to test your site without being logged in as administrator.

    Thread Starter simco

    (@simco)

    Hmmm…. I just checked in FireFox where i’m not logged in. Here’s the screenshot:

    https://bit.ly/2UIfr3N

    Plugin Author Prisna

    (@prisna)

    They show up now. From the current code, it seems those buttons are not really plugins, but more of a functionality within the same theme or woocommerce.

    Please test other translation plugins, and place them there. And lets see if they show up. If they don’t, then it’s something related with that specific area where external shortcodes aren’t really processed.

    Thread Starter simco

    (@simco)

    I think before you happened to catch a cached page. I purged the cache and that allowed the changes to show up (the shortcodes).

    I’ll try another plugin. Just inquiring, is there one that you would recommend that uses the shortcode method of display that would be a similar setup as yours?

    Plugin Author Prisna

    (@prisna)

    We can’t recommend any other plugin. But it wouldn’t matter, there’s only one way to register shortcodes (which is using the add_shortcode function). This is only for you to understand that the issue is related with that particular place and not with this (or other) translation plugin.

    Thread Starter simco

    (@simco)

    OK, I installed another plugin which creates a widget. The theme we’re using allows me to place widgets wherever I want so I added it to the header and the plugin does display the translator language selector. So it’s not a shortcode inserted there. But, take a look, it might provide some insight.

    Plugin Author Prisna

    (@prisna)

    Alright good job, it seems to be working fine now.

    Thread Starter simco

    (@simco)

    I’d prefer to use your plugin, though. What’s there now is someone elses.

    Plugin Author Prisna

    (@prisna)

    Our plugin can also be used as a widget, so you can place it there in the same way.

    But make sure to have only one Google Translate widget per page, it doesn’t matter if they’re different plugins, the widget is the same for all these Google Translate plugins.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Shortcode won’t work in Divi theme header’ is closed to new replies.