Search icon next to menu icon on mobile
-
Hi!
I hhave this PHP Snippet to add Search to the menu:
// As of 3.1.10, Customizr doesn't output an html5 form.add_theme_support( 'html5', array( 'search-form' ) ); add_filter('wp_nav_menu_items', 'add_search_form_to_menu', 10, 2);function add_search_form_to_menu($items, $args) {// If this isn't the main navbar menu, do nothingif( !($args->theme_location == 'main') ) // with Customizr Pro 1.2+ and Cusomizr 3.4+ you can chose to display the saerch box to the secondary menu, just replacing 'main' with 'secondary'return $items;// On main menu: put styling around search and append it to the menu itemsreturn $items . '<li class="my-nav-menu-search">' . get_search_form(false) . '</li>';}When on desktop the search bar stays outside of the menu, and I want it to just be an icon outside of the menu on mobile, like I have seen on Customizr Documentation and demo:
https://demo.presscustomizr.com/
Bu I found no way to add the search ícone outside of the menu on the documentation.
Can someone help?
thanks in advance!
The page I need help with: [log in to see the link]
You must be logged in to reply to this topic.
