-
Author
-
October 22, 2017 at 05:40 #177325rlarson87Participant
Hi, the AJAX search on the primary menu just has a search icon right now that is hard to notice. Is it possible to add a small search bar next to the icon in the menu to make it more noticeable?
Attachments:
You must be logged in to view attached files.October 22, 2017 at 17:26 #177384Kieran_SQModeratorHi,
It is possible to add a search field at the end of the menu but it would not be the ajax search that comes with KLEO. Adding the ajax search to the header directly would likely break a lot of different elements and certainly would when any user searched.
If you would like to add a general search form at the end of the menu please add the below code to the end of your KLEO Child theme’s functions.php file by going to WP Admin > Appearance > Editor > KLEO Child > Functions.php
COPY CODEadd_filter('wp_nav_menu_items','add_search_box_to_menu', 10, 2); function add_search_box_to_menu( $items, $args ) { if( $args->theme_location == 'primary' ) return $items."<li class='menu-header-search'><form action='https://irside.com/' id='searchform' method='get'><input type='text' name='s' id='s' placeholder='Search'></form></li>"; return $items; }
Another option would be to use CSS to make it clearer, you could try using any of the CSS below in your KLEO Child theme’s style.css by going to WP Admin > Appearance > Editor > KLEO Child > Style.css or by going to WP Admin > Theme Options > General Settings > Scroll to: Quick CSS
Add ‘Search’ after icon
.search-trigger::after {content: "Search";padding-left: 8px;}
Add ‘Search’ before icon
.search-trigger::before {content: "Search";padding-right: 8px;}
Change search icon color
li#nav-menu-item-search a {color: #ff0000;}
Thanks,
Kieran.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
-
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.