Better Search v2.0

Better Search just got massively better with v2.0.0. If you’ve been using WordPress’ default search engine then you’ll know by now that WordPress doesn’t give you relevant search results for your search terms. You’ll get posts that contain the search term ordered by date. Better Search completely replaces the inbuilt WordPress search engine by a contextual based search fetching you more relevant search results.

For v2.0.0, I spent a lot of time completely cleaning up all the code, fixing a lot of bugs and adding in a tonne of new features. The biggest addition to the plugin is several new and many improved filters and actions that will allow developers an ability to tap in and improve the plugin without the need for editing the plugin file. I’ve also documented these actions and filters in-line. So, if you’re curious, do take a look at the code in the Github repository.

If you’ve got a support query, or like to report a bug, please use the dedicated support forum. I simply ignore most comments or emails asking for support.

Highlight search results

This has been one of the most requested features for Better Search and finally finds it’s way into v2.0.

Highlight Search Results in Better Search Admin Option
Highlight Search Results in Better Search Admin Option

You’ll find this option under in the Better Search settings page under the Search options section. Selecting this option will wrap the search terms with a class .bsearch_highlight. You will need to add  .bsearch_highlight { background:#ffc; } to the Custom Styles box further down the options page. If you’re installing the plugin for the first time, or have reset the options, then you’ll find this included by default.

Recreate Index and Delete Transients

Better Search Maintenance options
Better Search Maintenance options

If you’ve deleted or editted a post, the index created by Better Search might still be stale. In order to quickly reset it, you can hit the Recreate Index button.

In order to speed up subsequent search results, Better Search uses the Transients API to cache the results of a particular search term. This works in both seamless mode and using custom templates. However, a known issue with transiensts is that they are not auto-deleted. You can use a plugin like Delete Expired Transients to clean up expired transients automatically. Alternatively, you can hit the Delete transients button to delete any transients set by Better Search. Note that this deletes all transients set by the plugin (not just expired ones).

Complete list of changes in Better Search v2.0:

  • New: Network Activate and Deactivate the plugin on WordPress Multisite
  • New: Option to highlight search results. If missing, add: .bsearch_highlight { background:#ffc; } under Custom Styles
  • New: Fully filterable search query
  • New: Recreate Index button in the settings page
  • New: Delete transients button in the settings page
  • Modified: Better Search will now try BOOLEAN MODE and non-FULLTEXT modes in case FULLTEXT search doesn’t return any results
  • Modified: Deprecated always dynamic heatmap option that bypassed cache
  • Modified: Reorganised admin interface
  • Modified: Seamless mode is now the default mode
  • Modified: Better Search uses transients to catch results when not using seamless mode
  • Modified: Search form uses class instead of id
  • Fixed: Seamless mode would overwrite all queries, even those outside the loop
  • Fixed: WordPress widget settings


Download Better Search v2.0.0

Share this post with your friends!

Leave a Reply

Your email address will not be published. Required fields are marked *

Get more stuff like this
in your inbox

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.