[Resolved] move the search icon into the hook generate_menu_bar_items

Home Forums Support [Resolved] move the search icon into the hook generate_menu_bar_items

Home Forums Support move the search icon into the hook generate_menu_bar_items

  • This topic has 6 replies, 3 voices, and was last updated 3 years ago by Leo.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1680539
    Davide

    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

    #1680617
    David
    Staff
    Customer Support

    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 ?

    #1680811
    Davide

    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!

    #1680815
    Leo
    Staff
    Customer Support

    Try this CSS:

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

    that’s interesting πŸ™‚ thanks
    is it possibile to move it before the generate_menu_bar_items hook?

    thanks
    D.

    #1680838
    Davide

    Ok done it πŸ™‚

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

    The flexbox layouts are really powerful, still have to dig into them πŸ™‚

    thanks!
    Davide

    #1680959
    Leo
    Staff
    Customer Support

    No problem πŸ™‚

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.