If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #24796

    Dear Support Team,

    I would like to add the Google Website Translator Plugin to the navigation menu on the Enfold theme.


    Google’s instructions are to place the snippet below where I would like to display the plugin.

    <div id=”google_translate_element”></div><script type=”text/javascript”>

    function googleTranslateElementInit() {

    new google.translate.TranslateElement({pageLanguage: ‘en’, layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, ‘google_translate_element’);



    <script type=”text/javascript” src=”//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit”>


    Could you please advise me where I should place this code in the header.php file.

    If it is not possible to add the plugin to the navigation menu – on top of it will also do :-)

    Thanking in advance,

    Kind Regards,



    Hi Will,

    You can add that code to the header.php file wherever you want it to show up.

    Unfortunately we can’t give you an exact spot or the overall code that will add it in flawlessly as it depends on where you want it and how you want that translate widget to changes when the theme changes for the responsive design.

    So once you’ve added it into your header, there will still need to be some css fixing to get it exactly how you want it.




    Dear Devin,

    Thank you for your prompt reply.

    I have added the script to the header.php file write below:

    <?php do_action(‘ava_main_header’); ?>

    <div class=’container’>

    I believe that’s an acceptable compromise. However its pushing the navigation menu down a few pixels and its covering the top of the slider!

    Here is a link to the website:


    Could you please advise me on how to fix this small aesthetic issue? Do I need to change a few lines in the layout.css file?

    Thanking in advance,




    Please add this on your custom.css or Quick CSS

    .goog-te-gadget-simple {
    background: none;





    Dear Devin,

    I apologize for the inconvenience,

    We will be switching to the WPML plugin.

    Kind Regards,


    Best regards,


Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Google Website Translator Plugin’ is closed to new replies.