How to add GT manually?
Apr 25, 2011 6:18 am by poloplayer
Apr 25, 2011 6:18 am by poloplayer
Hi there,
Since the last update I can see a message in admin:
DO NOT COPY THIS INTO YOUR POSTS OR PAGES! Put [GTranslate] inside the post/page
or add a GTranslate widget into your sidebar from Appearance -> Widgets instead.
Does it mean I can not add PHP or JS code manually into my wordpress page/header? I have a specific place in WP where I can not use [GTranslate] or widget area and I was wondering if there is any way to add GT manually. Otherwise the whole plugin is useless for my sides and I have to look for some alternatives.
Thanks
Re: How to add GT manually?
Apr 26, 2011 9:40 am by Edvard
Apr 26, 2011 9:40 am by Edvard
You can put it in the php files if you want. Wordpress formats the input and it is not always true that you will get exactly the same in the source code. You need to check the source code to see if you have the same output.
Re: How to add GT manually?
Apr 27, 2011 3:03 am by poloplayer
Apr 27, 2011 3:03 am by poloplayer
Thanks Edvard for the hint. Do you have by any chance a possible PHP code for GT to include in my WP template page? Sorry I'm not a programmer. Thanks a lot
Re: How to add GT manually?
Apr 28, 2011 12:11 pm by Edvard
Apr 28, 2011 12:11 pm by Edvard
You can include HTML inside PHP. To do that you just need to close the php ?>, paste the HTML, open php <?php ...
Ex. your template file:
<?php
....
....
....
?>
GTranslate HTML
<?php
....
....
....
Re: How to add GT manually?
Nov 24, 2011 9:34 pm by poloplayer
Nov 24, 2011 9:34 pm by poloplayer
Hi Edvard,
I need to add gtranslate to my WordPress template using js. or php as I did with the gT old version here:
http://www.voicerr.com
Would it be possible using function exists e.g.
<?php
if(function_exists("gtranslate")) {
gtranslate();
}
?>
If not then how can I include your code in my WP php template page not using [gtrans] ?
Thanks
Re: How to add GT manually?
Nov 25, 2011 12:18 pm by Edvard
Nov 25, 2011 12:18 pm by Edvard
You can do this way echo do_shortcode('[gtranslate]');
http://codex.wordpress.org/Function_Ref ... _shortcode
Re: How to add GT manually?
Nov 28, 2011 3:41 am by mstolp
Nov 28, 2011 3:41 am by mstolp
Hi Edvard, I want gTranslate Pro to appear in upper right corner of each page.
I am not clear what js code to insert into header.php and formatting in styles.css to make that happen.
Any suggestions?
Thank you.
Mike
Re: How to add GT manually?
Nov 28, 2011 12:10 pm by Edvard
Nov 28, 2011 12:10 pm by Edvard
You need to use PHP to insert it. Please read the previous post.
SIMILAR TOPICS
Combining manually translated French pages with GTranslate | Oct 16, 2018 2:24 pm | Replies: 3 | Post by: oxygensmith |
Manually translate only certain words | Feb 7, 2014 11:27 pm | Replies: 8 | Post by: tmedia |
Manually Editing Not Working | Sep 24, 2013 10:02 pm | Replies: 1 | Post by: stefano |
Undesired Characters When I Use The Manually Translation | Mar 3, 2011 12:42 pm | Replies: 2 | Post by: [email protected] |
Gtranslate 3.14 edit the translations manually | Feb 20, 2011 4:42 pm | Replies: 2 | Post by: rcrncec |