Join our list!
Our blog, delivered to your inbox. Never miss a post!
Need a more advanced search box?
If you want users to be able to search your site, you can easily drop the search widget into your sidebar and a easy, peasy, your users can search.
However, it’s not a very advanced search. Someone can type in a phrase and search and get all the results for that phrase, but it’s not a very advanced results list. You can’t showcase results in any kind of hierarchy or feature pages that are more likely to fit that search. All results show up in date order. If your site is small, then that’s no problem. Your search may return 5 results so it’s not a log to sort through. However, if you have a big site with lots of pages and posts, this could be a problem. Your users may not want to sift through 50 search results to find the right one. So you need a more advanced search.
I recommend a plugin called Relevanssi to create a better search experience for your users. This plugin has a free and premium model, but I’ve found the free version to be rather robust. The key feature, for me, is the ability to present the results in order of relevance rather than date order.
You can set the ordering, select the type of keyword matching, and then weight the way the results match the keyword selection. As you can see in the screencap above, I gave the title a heavier weight than everything else, the content being second and then everything else equal below.
Another feature I like is the ability to customize your search results. The default WordPress search displays in whatever way you have set your posts to display (either full text or excerpts.) Relevanssi allows you to display either full or excerpts, regardless of how your posts are set to display, and allows you to pick the number of words in your excerpt as well. My favorite part of this customization is the ability to highlight your search terms in the results, which makes it much easier to tell if the result is relevant to what you’re searching for.
This plugin has lots of other features, like the ability to prevent indexing of certain types of pages or posts. Say you want your search to only work for a specific custom post type, you can make that happen.
It’s not an out of the box install though, you do need to do some configuration and indexing to make it work. You can’t just activate and go. Overall, though, this is a great plugin that can really extend your basic search for your site.