Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #226353

    Hello
    I would put a flag to change the language in the upper right corner of the page.
    I turned on WPML.

    best regards

    #227196

    Hi osukaru!

    Please open Header.php file in Appearance > Editor and find

    /*
                                * Hook that can be used for plugins and theme extensions (currently: the wpml language selector)
                                */

    and add following line right below it

    echo "<div id='flags_language_selector'>". language_selector_flags(); ."</div >";

    Cheers!
    Yigit

    #227383

    Unfortunately, when I add this phrase in this place crashes error.

    (Parse error: syntax error, unexpected ‘.’ in /home/xyz/public_html/new/wp-content/themes/enfold/header.php on line 126

    I tried to change it, but I could not.

    bit.ly/1hdkJHz

    #227430

    Hi!

    Please use this:

    echo "<div id='flags_language_selector'>". language_selector_flags() ."</div >";
    

    Best regards,
    Ismael

    #227432

    Hi
    no longer appears an error, but I do not see the flag still…

    #227480

    Hi!

    Sorry! My bad! Please use this:

    do_action('icl_language_selector');
    

    Add this on Quick CSS to adjust the position:

    #lang_sel {
    position: absolute;
    top: -20px;
    left: -160px;
    }

    Change the top and left value.

    Cheers!
    Ismael

    #227495

    unfortunately still does not appear on the flags … :/

    #227717

    Hey!

    Please try changing the header type to “Fixed header with social icons and bottom navigation”. If flags are still not visible, please post a temporary admin login so we can take a look

    Regards,
    Yigit

    #227856

    If the following settings are enabled:
    “Fixed Header with Social Icons and additional Navigation”
    “Non-fixed Header with Social Icons and additional Navigation”
    “Header with Social Icons and bottom Navigation”

    Flag icons appear even without adding code to the header.

    When these settings are enabled, flag icons do not appear even after adding code to the header:
    “Small fixed Header”
    “Small non-fixed Header”

    #228011

    Hi!

    What type of header do you want? If you want to show the language selector on Small Fixed Headers, you can edit header.php again. Find this code on line 187:

    do_action('ava_after_main_menu');
    

    Add the language selector code above.

    Cheers!
    Ismael

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘flag to change the language’ is closed to new replies.