How to remove search icon from menu in wordpress

Sometimes you may not need the search feature in your WordPress site and the search form in your theme may interfere with the user experience. In this article, we will show you how to easily disable the search feature in WordPress.

The Search Form in WordPress A search box is a standard part of most WordPress themes and it’s actually quite easy to remove this form if you don’t need it. The search form is added by default in every theme. This means that when you install a new theme on your site, the search box will be there. You can find this form in the header.php file of the theme. If you don’t want to use the search form, just remove the following line from the header.php file:

How to remove the search icon from the Header Main Area?

In order to remove the Search Icon on your Header, follow these steps: From your WordPress Dashboard, go to the Appearance > Customize > Header > Header Main Area section. Toggle off the Search Icon option. If you would like to add a search bar to your website, you will need to go to the Appearance > Customize > Header > Search Bar section. This is because the Search Icon is only available if you have a search bar.

With the search bar and the search icon under the Appearance menu, you will be able to access both of them and customize them in the same place. To change the color of the search icon, you will need to click on the Custom CSS link.

How to Disable the Search Feature in WordPress

Method 1. Remove Search Feature in WordPress Using a Plugin

The first thing you need to do is install the Disable Search plugin. For more details, see our step by step guide on how to install a WordPress plugin. The plugin works out of the box, and there are no settings for you to configure. Upon activation, it will remove search form from your WordPress theme and disable the search widget. If a user directly tried to enter a search query URL, the plugin will return a 404 error page. Note that this plugin does not affect the search functionality inside the WordPress admin area. You can still search posts and pages inside your WordPress admin.

Method 2. Manually Disable Search Feature in WordPress

This method requires you to add code to your WordPress files. If you haven’t done this before, then take a look at our guide on how to copy and paste code in WordPress.

You will need to add this code to your theme’s functions.php file or a site-specific plugin.

This code will simply redirect all direct or indirect search queries to a 404 page. It will also hide the search form in your WordPress theme.

We hope this article helped you learn how to easily disable search feature in WordPress. You may also want to see our mega list of the most wanted WordPress tips, tricks, and hacks.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Enabling/Disabling & Selecting Your Style

To enable or disable this item you’ll want to browse to Appearance > Customize > Header > Menu Searchwhere you will a dropdown for your menu search style. Select the disable option to remove it:

The ‘Search Box’ appears on the top right of the site header when a user clicks “Menu”. This is where you can search for a specific menu item. If you don’t want the ‘Search Box’ to appear, select the option ‘Disable Search Box’ in the ‘Menu Search Style’ dropdown. You can also edit the search box by editing the following code:

Why and Who Should Disable Search Feature in WordPress?

When a user searches for a product or service on the web, they expect to be able to find it. If they can’t find it, they often assume that the product or service doesn’t exist or that it’s not worth their time to find it. Removing the search feature from your WordPress site can help improve the user experience.

How to remove the search icon from the Header Main Area?

Answer: Go to Settings > Preferences > General > Accessibility > and select Search Icon from the list. Make sure that ‘Search Icon’ is selected under the list. Now just press the button that says Apply. The search icon will be gone forever!

How to add content on the Header Top Bar?

Answer: To remove the search icon, you must first enable the Header Top Bar. Once that is done, go to the header.js file in your website and delete all the information except what is necessary for the search icon (as seen below). Then upload the file using FTP and it should be displayed correctly.



By Muthali Ganesh

I am an engineer wih a masters in business administration from Chennai, India. I love discovering and sharing hacks.