"Did You Mean" Suggestions for Empty Searches
When a search finds nothing, suggests a corrected spelling based on the words in your post titles, such as "Did you mean chocolate brownies?", with a link to search again.
Snippet Library
Snippets that improve WordPress search: search custom fields and post types, exclude pages, redirect single results and highlight matching words. For content-heavy sites where visitors need to find things quickly.
When a search finds nothing, suggests a corrected spelling based on the words in your post titles, such as "Did you mean chocolate brownies?", with a link to search again.
Answers search requests that contain links, markup, very long strings or words you block with a 404, stopping bots from filling search pages with spam.
Adds a category dropdown to the site search form and the Search block, so visitors can search all content or only one category.
Sets exactly which content types the site search returns, for example posts, pages and your portfolio, instead of every public type.
Shows a small label such as "Page", "Post" or "Product" in front of each search result title, so visitors can tell results apart at a glance.
Ignores filler words such as "can", "my" or "need" in multi-word searches, so "how can I reset my password" finds posts about resetting passwords.
Hides chosen posts or pages (thank-you pages, landing pages, legal pages) from front-end search results.
Keeps posts from the categories you choose, such as internal updates or sponsored posts, out of the site search results.
When a search returns exactly one result, opens that result directly instead of showing a results page.
Leaves password-protected posts and pages out of search results so their titles are not exposed to visitors.
Wraps the searched words in mark tags in result titles and excerpts, so visitors see why each result matched.
Lets the site search find PDF, Word, Excel and PowerPoint files from the Media Library by their title, caption and description, alongside posts and pages.
Shows a dropdown of matching posts and pages under every search box as the visitor types, using the built-in REST API search.
Hides posts and pages that you set to noindex in Yoast SEO or Rank Math from your own site search, such as thank-you pages and thin landing pages.
Restricts front-end search results to blog posts, leaving out pages and other post types.
Records what visitors search for, how often, and whether anything was found, and shows the top searches in a dashboard widget so you can spot missing content.
Makes the site search also return posts whose categories or tags match the search words, so searching "recipes" finds everything filed under Recipes.
Ignores searches shorter than a few characters, which return huge, useless result lists and put extra load on the database.
Asks search engines not to index your internal search result pages, which are thin, endless and a favorite target for spam links.
Shows 20 results per page on search results without changing the blog page.
Leaves blog posts older than three years out of search results, while pages and other content types stay searchable, which suits news sites and fast-moving topics.
Lets visitors press the slash key on any page to put the cursor in the search box, a shortcut many people know from popular websites.
Redirects ?s=term searches to /search/term/ when pretty permalinks are enabled, which gives cleaner, shareable URLs.
Places the WooCommerce product search box above the product grid on the shop and product category pages.