Support » Theme: Coraline » Moving Polylang Language Switcher to the Top

  • Resolved middleastcrops

    (@middleastcrops)



    Hi guys,

    I have translated my website into different languages using Polylang plugin. For now I have placed the language switcher in the main menu section, but I would like to move it to the top, I mean placing it in the red area of the header and above the main menu (the address is: http://middleastcrops.co). May anyone show me how to do this?

    Thanks,
    H. K.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Siobhan Bamber (siobhyb)

    (@siobhyb)

    Automattic Happiness Engineer

    Hi H. K.

    You could reposition the language items in your menu using negative margins in your custom CSS:

    @media screen and (min-width: 770px) {
    .lang-item-51, .lang-item-55, .lang-item-137 {
        top: -80px;
    }
    }

    The above snippet would reposition the language items on devices that are 770px or more in width. You’d need to experiment further with CSS media queries in order to get it to work across smaller devices.

    The best option would be for you to create a separate, second menu in your child theme and place your language items in that menu. You would then call that second menu in the red area of the header. This option is a bit more advance and would require some familiarity with HTML and PHP.

    If you’d like to give the second menu option a go, the this guide gives a good introduction in how to add menus to a theme:

    Navigation Menus

    Let me know how you decide to go ahead or if any extra questions come up.

    Siobhan,
    It’s working great. Thank you very much for your help. You and other guys have been really kind and helpful 🙂

    Siobhan Bamber (siobhyb)

    (@siobhyb)

    Automattic Happiness Engineer

    You’re most welcome! I’m so glad we could help out.

    Hi guys,

    I have installed Polylang plugin and translated my website (http://middleastcrops.co) into different languages (English, French, Arabic & Persian). The default language switches is the left-to-right direction. But as the direction differs according to languages, I would like to have the location of the language switcher changed according to each language direction. I mean, when it changes into English/French I want the language icons to be located on the right side of the header, and when it changes into Persian/Arabic the language switcher be placed on the left side of the header. I really appreciate it if anyone can give me a help.

    H. K.

    Siobhan Bamber (siobhyb)

    (@siobhyb)

    Automattic Happiness Engineer

    Let’s keep discussion here for your last question:

    Different Language Switcher Directions for Arabic and English

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Moving Polylang Language Switcher to the Top’ is closed to new replies.