Site logo

Archived topic

Adding hook before search icon

11 replies · Started by Hans on November 11, 2021

Viewing posts 1–12 of 12

Hi,

I would like to add the WPML language switcher on the right side of the search icon in the menu on this website: https://ebcgroup.nl

I tried adding a hook with the PHP code for the switcher but I was not able to find the right setting to add it in this location.

Could you point me toward a solutions?

Best regards,
Hans

Hi there,

use the generate_menu_bar_items hook, and set the Hook priority to 20

Hi,

Added a custom hook with generate_menu_bar_items and priority set to 20 but does not show the selector.

Can you change the Customizer > General -> Structure to Flexbox.

That fixed it David, site logo got weird size but i can fix that.

Now it does work on desktop but not on mobile, do you have a solution for that as well?

And one more question, when switching to Flexbox structure when ik go back to general after altering it the selection ability is gone. Is it supposed to do that?

Do you have any page caching enabled as i cannot see any changes?

And one more question, when switching to Flexbox structure when ik go back to general after altering it the selection ability is gone. Is it supposed to do that?

Yes, we have been deprecating the old theme structure. All current versions of the theme will now be Flexbox

Sorry, I had to revert to previous back-up version to work on it on a later date.

If you could leave this threat open a little longer, then I will let you know when I have implemented the changes again. So you can have a look.

Thats ok - let us know when you need us.

Hi David,

I have but back in place the hook and desktop is working as expected.
As I mentioned in an earlier post, the language flags or not showing on mobile menu.

Maybe you could help me with that.

Hans

Try adding this CSS:

.main-navigation div[class^="wpml"] ul {
    display: block !important;
}

Awesome David, that did the trick, thanks!

Hans

Great!! Glad to be of help!

This archived topic is closed to new replies.