-
AuthorPosts
-
September 6, 2017 at 2:52 pm #848671
Hey :)
I have created two header menu. One is set to default main menu while the second is set to show on a certain page. The second menu does not show the small search icon on mobile devices.
How to fix this?
September 7, 2017 at 10:05 am #848993Hey enfoldgirl,
Could you please give us a link to your website, we need more context to be able to help you.
Best regards,
VictoriaSeptember 8, 2017 at 10:50 am #849522Hey Victoria,
Yes, here are the links.
September 11, 2017 at 2:17 am #850270Hi,
How did you assign a different menu? Are you using a plugin? Please upgrade the theme from 4.0.2 to 4.1.2.
Best regards,
IsmaelSeptember 12, 2017 at 11:02 am #850942Hey Ismael, :)
Yes i´m using a plugin to assign different menus, it´s called “Zen Menu Logic”.
If i need to change menu for a specific page, i have to do it within that page, but when i do the search icon disappear :(Updated to 4.1.2
September 12, 2017 at 2:19 pm #851008Hi enfoldgirl,
Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
Best regards,
VictoriaSeptember 13, 2017 at 8:30 am #851432Hey,
Of course, i send it private :)
Thanks!
September 13, 2017 at 4:27 pm #851647Hi enfoldgirl,
It says that search is appended only to the main menu
https://cl.ly/2N2l3o011E3z
All other menus are not main menus and so the search is not appended.
You will need to make edits in /themes/enfold/includes/helper-main-menu.php to have search on all menus.Best regards,
VictoriaSeptember 15, 2017 at 9:53 am #852437Hey Victoria, i know that the search is appended to main menu :)
What kind of edits do i need to make in PHP, can you guide me in the right direction?
And why not show the search in every menu?September 16, 2017 at 6:12 am #852790Hi,
If you want to append the search icon on every menu groups, please add this filter in the functions.php file.
add_action( 'after_setup_theme', 'after_setup_theme_append_search', 100 ); function after_setup_theme_append_search() { remove_filter( 'wp_nav_menu_items', 'avia_append_search_nav', 9997, 2 ); remove_filter( 'avf_fallback_menu_items', 'avia_append_search_nav', 9997, 2 ); add_filter( 'wp_nav_menu_items', 'avia_append_search_nav_mod', 9997, 2 ); add_filter( 'avf_fallback_menu_items', 'avia_append_search_nav_mod', 9997, 2 ); } function avia_append_search_nav_mod( $items, $args ) { if(avia_get_option('header_searchicon','header_searchicon') != "header_searchicon") return $items; if(avia_get_option('header_position', 'header_top') != "header_top") return $items; global $avia_config; ob_start(); get_search_form(); $form = htmlspecialchars(ob_get_clean()) ; $items .= '<li id="menu-item-search" class="noMobile menu-item menu-item-search-dropdown menu-item-avia-special"> <a href="?s=" data-avia-search-tooltip="'.$form.'" '.av_icon_string('search').'><span class="avia_hidden_link_text">'.__('Search','avia_framework').'</span></a> </li>'; return $items; }
Best regards,
IsmaelSeptember 18, 2017 at 9:46 am #853329Hey Ismael,
After updating and making some changes everything is working perfect!
Thanks for this awesome Theme and of course all the the help :DSeptember 19, 2017 at 5:34 am #853676 -
AuthorPosts
- The topic ‘Only one of my menus are showing the "Search icon".’ is closed to new replies.