404 to Search does a few things to help turn 404 pages into useful content:
Before displaying the 404 page, it tries to do additional guesswork to see if there's one (and only one) public post that closely matches the 404 URL. This extends the normal WordPress functionality of looking for a public post that starts with the same stuff in the 404 URL:
Example Page or Post: http://example.com/welcome-to-the-show
Core WP: http://example.com/welcome -> http://example.com/welcome-to-the-show http://example.com/show -> 404
With 404 to Search: http://example.com/show -> http://example.com/welcome-to-the-show
It will only do an automatic redirect if there's one (and only one) post that has the word ('show' in this example) in the slug. If you have another post with a URL of http://example.com/show-me-the-money, 404 to Search will instead fall back to showing a 404 page, but with some search results.
For genesis theme users, 404 to search is a no-brainier. Just enable the 404 to search and it will add another loop of search result content after the main loop on your 404 page (using the 'genesis_after_loop' hook).
For "regular" themes, a search-results.php template is provided. You can copy this template file into your theme folder to modify/customize it and make it fit into the style of your theme. Please don't modify the one in the plugin directory, it will get overwritten during an upgrade!
- Unzip 404-to-search.
- Upload the
404-to-searchfolder to the
/wp-content/plugins/folder of your site.
- Activate the plugin through the 'Plugins' menu in wp-admin.
- Optional: if you're not using a genesis theme, copy or upload the
search-results.phpfile to your theme's folder.
- Initial release