Forum Archive - Shortcode Not working. Displaying code on site

Shortcode Not working. Displaying code on site
Jul 25, 2014 1:55 pm by sredfiield
Hi, I successfully added GTranslate to a test site. Once that was approved, I duplicated everything I did on the live site. When I added the SAME shortcode to the header, the Flags (sprites) done show up, instead, the actual words [GTranslate] show up in big white letters. Here is where it is working correctly: http://livingdesert.grafxtampa.com/ I can't keep up the error on the live site, but here is the code I am using: <div style="float:right;"> <span style="font-size:9px; color:#D8B477;">Google Translate:</span> <?php echo do_shortcode('[GTranslate]'); ?> </div> And here is a screenshot of what it looks like: http://pbrd.co/1rEa69z Any ideas of what I may be missing? The plugin settings are exactly the same on both sites.
Re: Shortcode Not working. Displaying code on site
Jul 25, 2014 5:22 pm by Edvard
Hi, I'm really not sure what it can be. But it looks like if the GTranslate plugin is disabled. Can you try to disable it and enable it again? Thanks!
Re: Shortcode Not working. Displaying code on site
Jul 25, 2014 6:48 pm by sredfiield
Hi, I tried that earlier, but no luck. I just now tried deleting the plugin and reinstalling it, hoping that would work. Still doesn't work. I'm using WordPress 3.8.1. Would that make any difference? It's definitely not recognizing the plug-in. I can't find any answers anywhere. Strange that it worked perfectly on the test site.
Re: Shortcode Not working. Displaying code on site
Jul 25, 2014 8:11 pm by Edvard
Can you confirm that you are able to show it in other locations?
Re: Shortcode Not working. Displaying code on site
Jul 28, 2014 3:14 pm by sredfiield
I was able to get the flags to show up in the sidebar using the widgets. So it seems to only be the shortcode not working in the header. Any ideas on other ways I can troubleshoot this. I have a deadline to get this live by this Wednesday. Thanks!
Re: Shortcode Not working. Displaying code on site
Jul 28, 2014 5:31 pm by Edvard
Hi, Can you try to use the shortcode in HTML widget to make sure that the shortcode is functioning? Thanks!
Re: Shortcode Not working. Displaying code on site
Jul 28, 2014 7:28 pm by sredfiield
Hi, I'm not sure I know how to do that? Is it just inserting [GTranslate] into one of the pages to see if it works or is there more code involved? I do appreciate your help!
Re: Shortcode Not working. Displaying code on site
Jul 28, 2014 9:06 pm by sredfiield
Okay, the shortcode is definitely not working on the live site. I just tested it on the test site by inserting [GTranslate] on a random page and it showed up perfectly. I did the same exact thing on the live site and again, the actual code shows up "[GTranslate]" So the widget in the sidebar works, but the shortcode does not, on the live site. Any ideas?
Re: Shortcode Not working. Displaying code on site
Jul 28, 2014 11:17 pm by Edvard
Hi, Are you using the same environment or may be it is Windows vs Linux? Can you try [gtranslate] instead? Thanks!
Re: Shortcode Not working. Displaying code on site
Jul 29, 2014 1:12 pm by sredfiield
I'm using Mac/Linux for both. I even deleted the plug-in and downloaded a new one, re-installed. I'm copying the same settings over that I am using in the test site. I tried [gtranslate], and it still isn't working. Seems like maybe something is missing? I just don't understand how the exact same code works on our test site, which is on a live server, (aka also live) but not on the Main live site. The live site is on a different server with different hosting, but I don't see how that would make a difference.
Re: Shortcode Not working. Displaying code on site
Jul 29, 2014 1:15 pm by sredfiield
Is there possibly any other code that can go in the header in place of the shortcode that still calls the plug-in?
Re: Shortcode Not working. Displaying code on site
Jul 29, 2014 7:34 pm by Edvard
Hi, You may try echo GTranslate::get_widget_code(); instead of do_shortcode. Thanks!

SIMILAR TOPICS

Large numbers of crawl errors with double language codeJan 24, 2019 1:43 amReplies: 1Post by: natastna2
how to translate site right to left for arabic in WordPressDec 26, 2018 9:02 amReplies: 1Post by: Hammond753
Flags Not Displaying Correctly GTranslateDec 19, 2018 10:16 amReplies: 1Post by: PetterParker
Would you share your site URL?Dec 3, 2018 4:57 pmReplies: 1Post by: BevVincent
Drop down is not working???Sep 30, 2018 11:05 amReplies: 1Post by: vijayparmar

Try GTranslate with a free 15 day trial