I have sent a PR to fix this error, but also dropping a note in case someone else encounter it.
If you use this plugin and see following error on browser’s console, it is because Disable Search is trying to disable (i.e. unregister) core’s core/search
block when it is already disabled by other code. That code could be your custom code, or by plugins. Particularly, block management plugin such as Block Manager, or similar feature on block library plugin
blocks.min.js?ver=6612d078dfaf28b875b8:12 Block "core/search" is not registered.
ue @ blocks.min.js?ver=6612d078dfaf28b875b8:12
(anonymous) @ disable-search.js?ver=2.0.1:3
It shouldn’t cause any issues for editing on the block editor, so I recommend you ignore it until this PR gets merged.
https://github.com/coffee2code/disable-search/pull/2
Hello @coffee2code,
since we are using your plugin “Disable Search” in many, many installations we are a bit worried because it got no update for more than 2 years now. According to this, www.remarpro.com shows the typical text “[…] hasn’t been tested with the latest 3 major releases of WordPress […]”.
Ok, it can be that simply no bug or anything has appeared and thus no update was necessary. But a little update pushing the “Tested up to” tag to the current WordPress version would be nice after two years. So your 40k+ users would know you haven’t abandoned the plugin and still can rely on it.
Would this be an option for you or did you perhaps really abandon this plugin?
Thank you for all your good work and many greetings,
-doffine
]]>Hey, how are you?
I very want to use your plugin but i little afraid you abounded the project.
You didn’t update the plugin for 1 year…
]]>So Google Webmaster Tools is reporting over 5000 pages that were excluded and the same amount for not crawled. This means that bots are somehow getting things created with the search function. There are no pages or anything in the database so will this plugin stop the bots from getting pages into Google Webmaster Tools?
]]>Hi,
I use google custom search in address: site.com/search/?q=Query
I do not want to disable the output of SearchAction in SEO schema by the Yoast SEO.
how can bypass this in your plugin?
]]>We have a google based search form in the spot where Word press would put its search –Class=”search-container”. Will your plugin remove that??
The problem is in my logs Hackers are throwing search URLS at our site by tacking them to the end of URLs like “/?s=fake search” and the unwanted wordpress search is picking them up and doing those searches. I want to give those hackers the 404 instead. BUT I don’t want your plugin to take out our google based search box by mistake.
Getting the following warning message in php_errorlog
PHP Warning: The magic method c2c_DisableSearch::__wakeup() must have public visibility in /home/customer/www/* * * * * * */public_html/wp-content/plugins/disable-search/disable-search.php on line 69
]]>Hello everyone, I just wanted to ask. What are the actual benefits of disabling WordPress search?
Thanks!
]]>Yoast SEO adds a @SearchAction
section to its SEO Schema by default. However, they have a filter disable_wpseo_json_ld_search
that you can return true to disable that. This might be a good idea to do by default in this plugin?
Hello, I use the Divi theme in WordPress. All parts have the latest updates. I just installed Disable Search but to no effect. Could Divi theme be the cause?
]]>Installed Disable Search on staging site to address what appears to very recent problem with custom theme and search (generating 500 site error). However, after installation, when manually insert URL for search term, I still get search results.
]]>The built-in search bar with my foodie pro website doesn’t show up on the mobile version. I’ve now added a second search bar using a widget, and want to remove the original one that comes with the theme. Haven’t found anything that’s worked so far, any ideas here?
]]>Just updates to 1.5, after that the plugin does not work anymore. I can search on my website…
Went back to previous version, waiting for fix.
]]>Warning: call_user_func_array() expects parameter 1 to be a valid callback, cannot access protected method c2c_DisableSearch::do_init() in /usr/home/emagik/shop.e-magik.com/public_html/wp-includes/plugin.php on
Any thoughts on this would be great
Best
Craig
Hi, after the last upgraded I started getting the following errors that look like compatibility problems with the caching plugin. Cache has been purged, but the issue is still there. Other plugins work well.
Warning: call_user_func_array() expects parameter 1 to be a valid callback, cannot access protected method c2c_DisableSearch::do_init() in /wp-includes/plugin.php on line 525
Warning: Cannot modify header information – headers already sent by (output started at /wp-includes/plugin.php:525) in /wp-content/plugins/sg-cachepress/class-sg-cachepress.php on line 339
Warning: Cannot modify header information – headers already sent by (output started at /wp-includes/plugin.php:525) in /wp-includes/pluggable.php on line 1228
]]>After line 111
$obj->set_404();
add new line
status_header(404);
Otherwise, you will get status_header 200 ОК, instead of 404 Not Found.
Waiting for update.
Hi,
This looks like a great plugin! I installed and activated the newest version but the search box still appears. (https://bestinoh.com/info/)
Your FAQ says, “There is no way for this plugin to prevent this hardcoded form from being displayed.
However, even if this is the case, the form won’t work (thanks to this plugin), but it will still be displayed.”
I don’t know if the form is hardcoded and causing the issue or there is more to setting up the plugin than just activating it – however, I am still able to get search results when using the search box.
Any ideas?
Thanks,
Mark
]]>Is it possible to use this plugin avoiding searching by default BUT allow search from within a single password protected page ?
I have one page which is protected by password. If a user is entering the password, the default search box should appear and serching from this page is allowed but whenever a user comes to the site, searching via GET …mydomain.com/?s=… should be not allowed and not possible.
]]>Plugin does not work
]]>instead of renaming or deleting it from my theme i did just create a an empty searchform.php file in the child theme folder.
works fine and you dont have to care about the file comming back during theme updates.
]]>get message: Note: Your present theme (and/or parent theme) contains a searchform.php template file which cannot be overridden by the Disable Search plugin. Presumably the theme uses get_search_form() which will cause the search form to appear.
]]>