Hello, today I wanted to search for something on my own site and soon noticed that there is no search option on mobile! How can I enable this? Doesn’t specifically have to be the little magnifying glass, a menu item/page only visible on mobile would be fine too.
Hi basdemos!
Please add following code to functions.php file in Appearance > Editor
add_shortcode('avia_search', 'get_search_form');
function add_custom_tooltip(){
?>
<script>
jQuery(window).load(function(){
jQuery('.only-mobile-menu-search a').removeAttr('href');
});
</script>
<?php
}
add_action('wp_footer', 'add_custom_tooltip');
and then go to Appearance > Menus and add a new link and add following into navigation label
[avia_search]
and then click “Screen options” on the top right side of the screen and check “CSS Classes”. Then edit your search menu item and give it custom CSS class “only-mobile-menu-search” and save. Then add following code to Quick CSS in Enfold theme options under General Styling tab
@media only screen and (min-width: 990px) {
.only-mobile-menu-search { display: none !important; }}
Regards,
Yigit
Thank you Yigit! Works like a charm!
Cheers,
Bas
Hey
You are welcome!
For your information, you can take a look at Enfold documentation here – http://kriesi.at/documentation/enfold/
And if there are features that you wish Enfold had, you can request them and vote the requested ones here – https://kriesi.at/support/enfold-feature-requests/
For any other questions or issues, feel free to post them here on the forum and we will gladly try to help you :)
Regards,
Yigit