Adding a widget in header


I would like to add the Polylang widget in the header of my website. Does someone know how I can do that?

Here is a link to the website: I want it to appear above the menu.


Hello there,

From menu administration panel (Appearance > Menus), add a language switcher menu item. Then do these steps to move it above the menu items:

  1. Install and activate the TC Custom JavaScript plugin
  2. Go To Appearance > Custom JavaScript
  3. Paste the following code into the provided box

      if( $('.lang-item').length ) {
        $('.lang-item > a').remove().clone().appendTo('.site-header').wrapAll('<div class="lang-switcher-menu"></div>');


4 . Update
5 . Add this CSS code to Appearance > Customize > Additional CSS from dashboard.

    .site-header {
      position: relative;

    .lang-switcher-menu {
      position: absolute;
      top: 40px;
      right: 15px;

    .lang-switcher-menu a {
      display: inline-block;
      margin-right: 10px;

    @media only screen and (min-width: 768px) {
      .lang-switcher-menu {
        right: 30px;


Thank you for the help! :slightly_smiling_face:

You’re welcome!

Please let us know in a new topic if you have any further questions, or if we can provide you with any other assistance.