Insert Google Language Translator code into header.php

Viewing 7 posts - 1 through 7 (of 7 total)
  • #16408
    gianvimake
    Participant

    Hi everyone, I’m using the Google Language Translator plugin to translate my site. I’d like to insert this code provided by the plugin

    <?php echo do_shortcode(‘[google-translator]’); ?>

    into header.php. Does anyone know where to insert this code? I’d like to have the flags at the bottom right part of the header.

    Can anyone help me?

    Thank you in advance

    #16414
    Daniel Tara
    Keymaster

    Regardless of where you insert that code, you’ll probably have to do CSS tweaks to make it looking like you want to. If you’re familiar with CSS try inserting it before the call to <?php get_sidebar( 'header' ); ?> and floating it to the right.

    #16417
    gianvimake
    Participant

    Hi, thanl you for your response. I didn’t find <?php get_sidebar( ‘header’ ); ?>. I searched it in header.php and in many others editor files. Where I can find it?

    Thank you

    #16482
    gianvimake
    Participant

    I’m not an html expert… can you help me solving the problem?

    Thank you

    #16575
    gianvimake
    Participant

    Hi, I’d like to insert the code (and the flags) into the title bar. Where do I have the insert the code?

    Thank you

    #17364
    BenDaSilva
    Participant

    Here’s my solution, edit the header.php, add a div between body tag and wrapper div:

    <body <?php body_class(); ?>>
    <div id=”translation” style=”float:right”>
    <?php echo do_shortcode('[google-translator]'); ?>
    </div>

    <div id=”wrapper” class=”hfeed”>

    • This reply was modified 10 years, 12 months ago by BenDaSilva.
    #17426
    gianvimake
    Participant

    Thank you very much, perfect result!

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

You must be logged in to reply to this topic.