{"id":27203,"date":"2021-07-24T15:00:48","date_gmt":"2021-07-24T13:00:48","guid":{"rendered":"https:\/\/qodeinteractive.com\/magazine\/?p=27203"},"modified":"2021-07-21T13:18:28","modified_gmt":"2021-07-21T11:18:28","slug":"how-to-remove-search-feature-on-wordpress-website","status":"publish","type":"post","link":"https:\/\/qodeinteractive.com\/magazine\/how-to-remove-search-feature-on-wordpress-website\/","title":{"rendered":"How to Remove the Search Feature on Your WordPress Website"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><p>[vc_row][vc_column][vc_column_text]Over time, people have grown accustomed to looking at a webpage \u2013 usually the top right corner \u2013 and seeing a search box there. Good website navigation isn\u2019t always easy to achieve, and features such as the search bar can help tremendously. [\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Does that mean that every website should have a search bar? Of course not. The feature is more than welcome on websites when it\u2019s useful. But if that\u2019s not the case, why not simply remove it altogether?<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]In this article, we\u2019ll show you:<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;22px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#the-reasons-to-remove-the-search-feature\">The Reasons to Remove the Search Feature<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;5px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#how-to-remove-the-search-bar-from-your-website\">How to Remove the Search Bar from Your Website<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;5px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#how-to-remove-the-search-feature-using-a-plugin\">How to Remove the Search Feature Using a Plugin<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;5px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#how-to-remove-the-search-feature-using-code\">How to Remove the Search Feature Using Code<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;80px&#8221;][vc_widget_sidebar sidebar_id=&#8221;new-top-picks-banner&#8221;][vc_empty_space height=&#8221;80px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\"><a id=\"the-reasons-to-remove-the-search-feature\"><\/a>Why Remove the Search Feature on Your WordPress Website?<\/h2>\n<p>[\/vc_column_text][vc_column_text]There are plenty of different kinds of websites that benefit from having a search bar. It\u2019s common sense that, the more complicated the website and the more content it has, the more valuable the search feature becomes. An <a href=\"https:\/\/qodeinteractive.com\/theme-category\/online-store-wordpress-themes\/\">online store<\/a>, for example, would benefit greatly from a search bar. So would a <a href=\"https:\/\/qodeinteractive.com\/theme-category\/blog-magazine-wordpress-themes\">blog or a magazine<\/a>.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]A search feature is an important part of website navigation \u2013 <strong>as long as there\u2019s somewhere to navigate to<\/strong>. Some websites don\u2019t have more than a page or two. This practice is somewhat common when creating <a href=\"https:\/\/qodeinteractive.com\/theme-category\/business-wordpress-themes\/\">business websites<\/a>.<strong> In those kinds of websites, the search bar won\u2019t be missed too much if it\u2019s gone.<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]There\u2019s also another kind of problem you might be having with the default search on your WordPress website \u2013 it might be too underpowered for your needs.<strong> In that case, however, you don\u2019t want to remove the search feature<\/strong>, as it might mess with some of the <a href=\"https:\/\/qodeinteractive.com\/magazine\/wordpress-search-plugins\/\">best search plugins<\/a> you could use to improve your website. <strong>Only remove it when you don\u2019t want to have a search feature on your website<\/strong> \u2013 otherwise, try a different <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-add-google-search-to-wordpress\/\">search provider such as Google<\/a>, or try to address your website\u2019s issues in another way, such as <a href=\"https:\/\/qodeinteractive.com\/magazine\/exclude-specific-results-from-wordpress-search\/\">excluding specific results<\/a> from search.[\/vc_column_text][vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\"><a id=\"how-to-remove-the-search-bar-from-your-website\"><\/a>How to Remove the Search Bar from Your Website<\/h2>\n<p>[\/vc_column_text][vc_empty_space height=&#8221;21px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"488\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Search-Bar.jpg\" class=\"attachment-full size-full\" alt=\"Search Bar\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Search-Bar.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Search-Bar-300x151.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Search-Bar-768x387.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Search-Bar-620x312.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]The easiest option you can use to deal with the search bar is to either don\u2019t add it in the first place or find its location and remove it. So if you\u2019ve <a href=\"https:\/\/qodeinteractive.com\/magazine\/add-search-to-menu-wordpress\/\">added it to the menu<\/a> as you can do with our Bridge theme, simply backtrack and have it removed.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]<strong>The way the WordPress search bar works is through a widget \u2013 that\u2019s how you add the bar to your website.<\/strong> If you don\u2019t want your website visitors to see the search box, navigate to <em><strong>Appearance &gt; Widget<\/strong><\/em>. Find all the areas where the widget is placed \u2013 be it the sidebar, a footer, or a header, and simply remove the search widget.[\/vc_column_text][vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\"><a id=\"how-to-remove-the-search-feature-using-a-plugin\"><\/a>How to Remove the Search Feature Using a Plugin<\/h2>\n<p>[\/vc_column_text][vc_empty_space height=&#8221;21px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Disable-Search.jpg\" class=\"attachment-full size-full\" alt=\"Disable Search\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Disable-Search.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Disable-Search-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Disable-Search-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Disable-Search-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]If you need to do more than just avoid displaying the search widget, you should try the <a href=\"https:\/\/wordpress.org\/plugins\/disable-search\/\" target=\"_blank\" rel=\"noopener\">Disable Search plugin<\/a>. It\u2019s available from the WordPress.org repository, it has no post-installation options to bother you, and it does a lot more than just prevent the displaying of the widgets.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]For example, the search box is available from the admin toolbar even if you\u2019re viewing the website\u2019s front end while you\u2019re logged in.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Search-Bar-Admin.jpg\" class=\"attachment-full size-full\" alt=\"Search Bar Admin\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Search-Bar-Admin.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Search-Bar-Admin-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Search-Bar-Admin-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Search-Bar-Admin-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]<strong>This plugin will take care of that.<\/strong> It will also completely disable the search widget \u2013 it won\u2019t even appear in the list of available widgets. It won\u2019t be deleted, either, <strong>so you can bring it back at any time by uninstalling the plugin, as the only thing it does is hide it.<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]The plugin will also not cause any issues with searching in the backend.<strong> It won\u2019t interfere with the search engine\u2019s abilities to search your website.<\/strong> It will prevent any GET or POST requests from returning search results.[\/vc_column_text][vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\"><a id=\"how-to-remove-the-search-feature-using-code\"><\/a>How to Remove the Search Feature Using Code<\/h2>\n<p>[\/vc_column_text][vc_column_text]In case you\u2019re feeling particularly adventurous, you can add your code to functions.php and disable the search function that way. And even if you\u2019re not into tinkering with functions.php, there are still great, easy ways to <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-add-custom-code-to-wordpress\/\">add custom code to WordPress<\/a>. So why don\u2019t you grab the <a href=\"https:\/\/wordpress.org\/plugins\/code-snippets\/\" target=\"_blank\" rel=\"noopener\">Code Snippets plugin<\/a> and install and activate it?[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Code-Snippets.jpg\" class=\"attachment-full size-full\" alt=\"Code Snippets\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Code-Snippets.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Code-Snippets-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Code-Snippets-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Code-Snippets-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]After activating the plugin, <strong>add the following lines of code as a snippet:<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">if ( is_search() ) {\r\n$query-&gt;is_search = false;\r\n$query-&gt;query_vars[s] = false;\r\n$query-&gt;query[s] = false;\r\nif ( $error == true )\r\n$query-&gt;is_404 = true;\r\n}\r\n}\r\nadd_action( 'parse_query', 'filter_query' );\r\nadd_filter( 'get_search_form', create_function( '$a', \"return null;\" ) );\r\nfunction remove_search_widget() {\r\nunregister_widget('WP_Widget_Search');\r\n}\r\nadd_action( 'widgets_init', 'remove_search_widget' );<\/pre>\n<p>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]This will ensure that the widget is removed from the website and the list and that any existing query returns a 404 error as a result.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\">Let\u2019s Wrap It Up!<\/h2>\n<p>[\/vc_column_text][vc_column_text]When creating a website, it\u2019s important to avoid overstuffing it with unneeded features. Not only will they confuse the visitor, but they might also make the website slower to load, or present potential security risks.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]For a website that has a page or two and generally aims to provide all the information to the visitor from one place, there\u2019s little use for a search bar. No matter how useful the feature is for some types of websites, when there\u2019s no clear reason to use it, you\u2019d best remove it. You\u2019ve got a couple of different ways of doing it, but none should require too much time or effort.<br \/>\n[\/vc_column_text][\/vc_column][\/vc_row]<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Are you thinking about ridding your WordPress website of the search function? We&#8217;ll show you a couple of ways you could  do it no-time!<\/p>\n","protected":false},"author":9295,"featured_media":27245,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[4,13],"class_list":["post-27203","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-tips","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts\/27203","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/users\/9295"}],"replies":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/comments?post=27203"}],"version-history":[{"count":0,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts\/27203\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/media\/27245"}],"wp:attachment":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/media?parent=27203"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/categories?post=27203"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/tags?post=27203"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}