Site logo

Archived topic

How to place WMPL language switcher near the menu icon on mobile header

9 replies · Started by Ricardo on March 5, 2022

Viewing posts 1–10 of 10

Hi,

I've been reading some questions in this forum about this topic, but cannot find any answer to this question:

How can I have a WPML language switcher on mobile header near the hamburguer menu icon?

Thank you very much for your help.

Hi there,

try adding this CSS:

@media (max-width: 1024px) {
    .main-navigation .menu-bar-items ul {
        display: block;
    }
    .menu-bar-items .wpml-ls-legacy-list-horizontal.wpml-ls-statics-footer {
        margin-bottom: 0;
    }
}

Thanks a lot David for helping noobs :)

Regards,
Ricardo

Glad we could be of help

Hi,

Regarding this topic, I would like just ask one more thing:

How can I reduce the width of the area of the language switcher? I think that it's simply ocupying the area that generatepress provides, but I'm not sure. I would like it to be much smaller and right aligned.

Thank you very much!

Hi Ricardo,

The width of the language switcher is controlled by the plugin, you can see the CSS here:
https://www.screencast.com/t/S3NmzsfQ

However, you can add this CSS to override the plugin's original CSS:

.menu-bar-items .wpml-ls-legacy-dropdown {
    width: 120px;
}

Beautiful!

Thank you so much for your generosity.

Regards,
Ricardo

You are welcome :)

This archived topic is closed to new replies.