For as much as we love WordPress (and you know we do), we’re not afraid to say where its issues are.
One piece of functionality that has never been truly developed in WordPress is search.
And for the most part, that’s OK, since it’s not a core competency of the software. But, nearly every site we build includes a search feature, so it’s something that we’ve spent a fair amount of time improving.
Out of the box, when you do a search, WordPress will look at titles and content for your posts and pages. If you’re just using WordPress as a blog, that may be an OK approach — but for most sites, it isn’t. With so much content being stored in custom fields, or users wanting to find comments or custom taxonomies, you need to be able to find more.
Luckily, there are a few ways to do that – and make WordPress search usable.
Obviously, one of the great things about WordPress is that the community steps up to improve functionality where it is lacking. So there’s plenty of plugins that improve the built-in search engine.
Our favorite is Relevanssi, which replaces the built-in WordPress search engine with its own. There are a ton of advanced options, like …
Relvenassi also has a Premium version, which offers you support, additional features like results weighting, and Multisite support.
Search Everything is another popular option because it does exactly what the title says it will. Since so many of the sites we build store data in custom fields, or in custom post types and taxonomies, the built-in search won’t look there; Search Everything makes it.
While these two plugins tend to be the ones we work with, there are a number of other options out there.
If you want to do search right, why not go to the company that built it right?
Google offers their Custom Search Engine as a mini Google search just for your site. It uses the same software as their search engine, so it’s pretty good — and it searches just your site.
There’s two different options: free and paid. With the free version, Google ads are included — but you can actually connect your Adsense account and make some money off of them. If you go with the paid version (starting at $100/year), you can remove all of the ads and better brand the search engine to your site.
We used to do Google Custom Search Engines all the time for our clients, but have scaled back recently as we more often …
At the end of the day, WordPress’s search can be fine-tuned pretty well, especially if you add in filtering and can modify the queries being passed.
For example, on one of our most recent site launches, Businesses for the Bay, we needed to build a way to find members based on a number of factors, including their location, the project themes they’ve worked on, and their membership type.
This meant we needed to:
Thankfully, using the power of Advanced Custom Fields and plenty of time spent in the WordPress Codex, we were able to build a fully-functioning Member search engine, which exists side-by-side with the normal site search.
Like with so much of WordPress, the core contributors are hesitant to build in functionality that can better be handled by a plugin. It makes a lot of sense, especially since every site is different.
But as your site gets more complicated and more custom, you’ll likely find that you need some advanced search functionality. Thankfully, it can be done — and when it is done, it’s quite powerful.