Plugin: GTranslate: Direct embed into template? (5 posts)

  1. lotsen
    Posted 5 years ago #

    Hello and Happy Thanksgiving!

    I'll keep this short.

    I was just curious how I would go about directly embedding the GTranslate plugin ( located @ http://wordpress.org/extend/plugins/gtranslate/ ) into my WordPress template's .php files.

    Like some Plugins let you do it with something similar to
    < ?php if(function_exists('example')) echo example() ;?>

    I'd prefer to not have it as a widget, and I've googled for about 45 minutes now for an answer, and I've had no luck, sadly.

    Any help would be much appreciated, seems like it would be a somewhat simple thing to do.

    Thanks either way!

  2. lotsen
    Posted 5 years ago #

    Nobody? :o(

  3. lotsen
    Posted 5 years ago #

    Pretty surprised there is no answer to this anywhere on the internet.

    Oh well, thanks anyways.

    Posted 5 years ago #

    I'm totally with you! GTranslate is an amazing plugin! I want to embed it into the nav menu at SKUFF Protective Coatings. There isn't an answer?

    I was thinking you could use the Widgets on Pages plugin and then call the shortcode using php -- i.e
    <?php echo do_shortcode('[widgets_on_pages id=x]'); ?>
    The only problem is: then you have to rely on another plugin for it to work...I'd rather have a good php function to put in the template, if you get my drift. :)

    I'll let you know how it goes!

    Posted 5 years ago #

    I've been formatting. It works, but it's easier to just add:

    <?php echo do_shortcode('[GTranslate]'); ?>

    wherever you want to in your template.

Topic Closed

This topic has been closed to new replies.

About this Topic