The search function on every website should be found in the top-right corner of the website for usability purposes.
It serves as a shortcut for visitors to find what they're looking for, and is especially useful for poorly laid out, or poorly interlinked websites.
The search bar is like your navigation menu, cranked up to 11.
We do not recommend removing the search bar.
Note: None of these will remove the ability of a user to perform a search of your website by simply add "/?s=search text" to your address bar. Or by typing "site:feastdesignco.com search text" into a search engine.
Best
Don't do it.
Second-Best
Remove the search form from loading using the code snippets plugin and adding:
add_action( 'init', function() { remove_filter( 'wp_nav_menu_items', 'feast_primary_nav_menu_search', 12, 2 ); } );
or, depending on your theme version, you may need to use alternative code:
add_action( 'init', function() { remove_filter( 'wp_nav_menu_items', 'foodie_pro_primary_nav_menu_search', 12, 2 ); } );
Alternate
Simply hide it by applying the "display:none;" CSS property in your admin's "Additional CSS" panel:
#feast-search{display:none;}
For Foodie Pro v.4.4.0 and older:
#foodie-search{display:none;}
Worst
Do not edit theme's functions.php file, because changes you make there are lost during updates. You also run the risk of crashing your site. Use the code snippets method above.
Pre-3.1.6 Themes
Theme versions older than 3.1.6 will have the theme name in place of the feast function.
eg. feast_primary_nav_menu_search will be either:
- foodie_pro_primary_nav_menu_search
- cravings_pro_primary_nav_menu_search
- seasoned_pro_primary_nav_menu_search
Erica says
Thanks for sharing this. The issue is that the search bar does not show up well on mobile. It is in the dropdown menu, but is hard to spot so people miss it. Is there a way to edit the search box (rather than remove it) so that it is more visible on mobile?
Thanks!
Skylar Bowker says
Hey Erica! I'd recommend checking out the Modern Mobile Menu in the Feast Plugin.
Brenna says
I don't want to remove my search bar but it is HUGE and stretches all the way across the bottom of my nav bar. How can I move it? I want to use a mega menu but I cant because it's in the way. Can I fix this somehow? https://www.castleinthemountains.com/
Thanks!
Skylar says
We don't recommend or support the use of mega menus because they cause an unnecessary number of DOM nodes and typically rely on javascript, both of which are bad for pagespeed.
If you require support configuring your site to look like the demo sites, please submit a support ticket.
Brenna says
Thanks. I understand and I appreciate the help. I am still struggling with how to create a desktop menu with enough food categories, no drop down and no mega menu. I read the article about modern menus but I worry that people won't find a category that they are looking for and just leave. Am I just thinking in antiquated terms? Do people not even use a menu anymore?
Skylar says
Correct - menus are not a mobile-first approach and are often poorly organized by the site owner. They add DOM nodes, which slow down each page, despite being used by only a fraction of users.
Instead, use the Modern Homepage and Modern Recipe Index, and provide a search bar for users to simply search the site.
yasmin says
Is it possible to change the href for the search button so that it takes the user to a different destination?
Specifically I need to change the anchor from #feastmobilemenu to #search but do not know how to go about this.
Sara says
I noticed a search bar in the middle of the homepage on many of the sites in your modern home page showcase. Is this recommended? If so, is there an easy way to insert and configure that?
Skylar says
Yes! This is covered in the Modern Homepage.