Site logo

Archived topic

move the search icon into the hook generate_menu_bar_items

6 replies · Started by Davide on March 3, 2021

Viewing posts 1–7 of 7

Hi, is there a way to move the search into a generate_menu_bar_items hook?

The current situation is: on the left side the main navigation menu, which is fine.
On the right, the generate_menu_bar_items hook with some "stuff" inside (a wpml language switcher, some social icons) and on the far right the search icon.

Is there a shortcode or similar to add the search icon to the generate_menu_bar_items hook, replacing then the "default" search?

thank you
Davide

Hi there,

not sure i understand - the Search Icon is already being output inside the Menu Bar Items ... can you explain what you're trying to change ?

Hi David,
I'm trying either to move the search before the generate_menu_bar_items hook, or inside it, so I can change the order of its elements.

Right now inside the generate_menu_bar_items there's something like:

<i class="fab fa-instagram fa-lg hide-on-mobile"></i>
<i class="fab fa-soundcloud fa-lg hide-on-mobile"></i>
<?php	do_action('wpml_add_language_selector');?>

and I'd like to have the possiblity to put the search between the social icons and the language selector etc.

Thanks!

Try this CSS:

.menu-bar-items .wpml-ls-legacy-list-vertical {
    order: 20;
}

that's interesting :) thanks
is it possibile to move it before the generate_menu_bar_items hook?

thanks
D.

Ok done it :)

.menu-bar-items .search-item {order:-1;}

The flexbox layouts are really powerful, still have to dig into them :)

thanks!
Davide

No problem :)

This archived topic is closed to new replies.