• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Feast Design Co.

WordPress Themes for Food & Lifestyle Bloggers

  • Themes
  • Feast Plugin
  • Blog
  • Support
  • Tutorials
  • Nav Social Menu

    • Email
    • Facebook
    • Instagram
    • Twitter
menu icon
go to homepage
  • Feast Plugin
  • Support
  • Tutorials
  • Account
    • Facebook
    • Instagram
    • Twitter
  • search icon
    Homepage link
    • Feast Plugin
    • Support
    • Tutorials
    • Account
    • Facebook
    • Instagram
    • Twitter
  • ×

    Home » How To Customize Your WordPress Themes

    Remove Search Box from Navigation Menu

    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

    Reader Interactions

    Comments

    1. Erica says

      November 27, 2019 at 2:28 pm

      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!

      Reply
      • Skylar Bowker says

        November 28, 2019 at 5:22 am

        Hey Erica! I'd recommend checking out the Modern Mobile Menu in the Feast Plugin.

        Reply
    2. Brenna says

      September 17, 2020 at 7:21 pm

      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!

      Reply
      • Skylar says

        September 18, 2020 at 5:00 am

        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.

        Reply
        • Brenna says

          September 19, 2020 at 2:43 pm

          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?

          Reply
          • Skylar says

            September 19, 2020 at 3:01 pm

            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.

            Reply
    3. yasmin says

      April 14, 2022 at 4:57 pm

      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.

      Reply

    Leave a Reply Cancel reply

    Your email address will not be published. Required fields are marked *

    Primary Sidebar

    Themes

    • Feast Plugin grants access to all 5 themes
    • Not sure where to start? See the getting started guide

    Feast Plugin

    • Feast Plugin
    • Modern Homepage
    • Modern Sidebar
    • Modern Footer
    • Modern Mobile Menu
    • Modern Menu
    • Modern Recipe Index
    • Modern Categories
    • Modern 404
    • Recipe Update Checklist
    • Recipe Post Template

    Resources

    • Image optimization
    • Recipe Guidelines for Foodie Bloggers
    • How to write a recipe post
    • Page headings
    • SEO for Food Bloggers
    • Tutorials
    • Pagespeed Audit
    • Comments
    • Internal links

    more resources →

    Categories

    • Modern Recipe Index
    • Modern Categories
    • Posts per Page
    • How to use categories
    • Category pages need content
    • How to configure the category pages
    • Food blog site structure
    • Food blog page structure

    Classic themes

    The classic themes are only for hobby sites and any food blog interested in monetizing or SEO needs the Feast Plugin.

    • Foodie Pro Classic
    • Brunch Pro Classic
    • Cook'd Pro Classic
    • Cravings Pro Classic
    • Seasoned Pro Classic

    Footer

    ↑ back to top

    Topics

    • Food Blog Design and Appearance
    • Productivity
    • Tech and Plugins
    • Food Blogging and Promotion
    • Minimalist WordPress Themes
    • Simple WordPress Themes
    • Travel blogs
    • Knitting + DIY blogs

    Help

    • Documentation & Tutorials
    • Food Blogging Resources
    • Open A Support Ticket
    • Login
    • Your Account
    • Subscriptions
    • Downloads
    • Discounts and Coupons
    • Compatibility

    Company

    • Subscribe to newsletter
    • Privacy Policy
    • Refund policy
    • Terms & Conditions
    • Principles and Best Practices
    • Affiliates
    • Contact

    Copyright © 2023 · Feast Design Co.

    Results not typical or guaranteed. Our themes and plugins are just a small part of the overall effort involved in running a food blog. Nothing on this website shall constitute legal or financial advice, always consult a local lawyer and accountant. Accessing this website and all transactions herein are under the laws and jurisdiction of Toronto, Ontario, Canada.