Overview:
Do you hate the inbuilt WordPress search?
Improve your visitors search experience with Better Search. Better Search will provide contextually search your WordPress blogs and then list the results based on relevance. By using a template file you can completely control the look and feel of the search results page.
Additionally, the plugin will track the searches and allow you present a “search heatmap” of the most popular searches.
Features:
- Search for posts contextually with results sorted by relevance
- Automatically replaces your default WordPress search with Better Search results
- Display a list of popular search terms (daily and overall) on your blog in the form of a heatmap
- Choose between WordPress search and Better Search (coming soon)
- Support for templates for complete customization of look and feel of search results page
- Clean uninstall if you choose to delete the plugin from within WP-Admin
- Works with caching plugins like WP-Super-Cache
Requirements:
- WordPress 2.7 or above
Installing
- Download Better Search.
- Extract the contents of
better-search.ziptowp-content/plugins/folder. You should get a folder calledbetter-search. - Activate the Plugin in WP-Admin.
- Goto Options > Better Search to configure.
- Goto Appearance > Widgets to add the Popular Searches sidebar widgets to your theme
Options:
Below is the options screen as you would see it when you activate the plugin.
In order to display the most popular searches, you will need to add <?php if(function_exists('the_pop_searches')) the_pop_searches(); ?>.
In order to display the most popular searches weekly/daily, you will need to add <?php if(function_exists('the_pop_searches_daily')) the_pop_searches_daily(); ?>.
Alternatively, use the sidebar widgets to display the overall or weekly top searches.
By default the plugin adds powered by link to this page. You can choose to uncheck that above. However, it would be great if you could give me some link love and help promote this completely free plugin.
ChangeLog:
- 1.1.7 – Added two new fulltext indexes -
Home







It seems like search results show [shortcode] used in posts. Maybe they should be filtered out when not rendered ?
John Myrstad
Really like this plugin and giving it a test-drive on my local installation. Search results are way better then the defaults, however there are some points which would be nice if implemented.
The layout of the search results (table | posts | footer) are still generated in the code. Would be nice if there could be some kind of callback feature where you can replace the output of a post with your own HTML, now you have to hardcode it in the plugin.
This is actually a top priority list. Instead of a call back function, I plan on implementing Template Tags (or support for WordPress inbuilt Template Tags). I believe this is a lot easier to implement and understand for users.
I have been modifying the plugin, particularly the
foreachloop which displays all the posts, so it mimics as if it was inthe_loop.This makes it much easier to work with as wordpress then has several functions available for displaying the posts.
Hi Jan Jaap and Ajay,
Jan Jaap, could you share your code with us? I’m very interested in how you did this! Maybe it is also a solution for the question by John Myrstad. I’m also stuck with the [shortcodes] issues.
It looks to me that the_excerpt() handles those codes quite well by eliminating them, which is better than, well, showing the codes themselves
TIA,
regards,
Tom
Tom,
I modified the better-search.php file, adding several variables so that it is tricking wordpress that it is in ‘the_loop’.
My better-search.php file
Thanks Jan. I’ll implement these changes after my tests into the next version of WP.
Also internationalize the same accordingly.
Thanx a million Jan Jaap and Ajay! I notice your alterations have some Dutch phrases… geen probleem! / no problem!
I’ll go check them out!
Tom
Hi,
just implemented the plugin, with the alterations of Jan Jaap. It is in fact (I think) the solution to the question of John. At least it does the trick for me!
One comment though: it is a bit unclear to me how the relevance is calculated. Sometimes when I perform a search, I’d expect some results coming up before others. But fair enough, I think it is way better than the original WP-search. Thanx again, Ajay for your good work, and Jan Jaap for your adjustments!
Regards,
Tom
The relevance is a calculated by mySQL by matching the term with your content.
I’ll be putting in Jan’s implementation the moment I find the time to update.
I have been modifying and stripping down this modification even further until I came up with the following version for my own website.
Stripped version of better search
Basicly what I did is use the filter functions of wordpress and replace the query for fetching the search posts with the one used in better-search plugin.
Then if you are in the search.php file of your template you can still access the search score via
$post->score.So again I want to thank you for releasing this great plugin as it improves search results quite a lot.
Hi,
Nice plugin.
My suggestion would be a way of turning off popular search/hot searches so that only the contextual search appears if that makes sense.
Elliott
You can easily do that by creating a template file for your theme. Check the link above.
Hi, thanks for a great plugin.
Is there any way to limit the summary length in the search results, or eliminate the summary completely? Other options would be to display tags and categories, but these are somewhat addressed in comments above.
Cheers
First congratulations for this great plugin.
Just a request. Can you create an option to enable/disable showing the daily/week/popular searches ?
Because, I wanted to just show the Popular searches and was a war to do it
. I am almost sure that I messed up with the code.
Anyhow, thanks for this plugin.
Best,
Daniel
The Total Popular Searches and Daily Searches are two different widgets / functions.
Hi,
And how do I enable only Total Popular Searches?
Thanks
http://ajaydsouza.com/wordpress/plugins/better-search/#installing
Hi, great plugin! Congrats!
I have a question, how I hide contact form (contact form 7- famous plugin) codes from search results?
Ex: [contact-form 1 "contact"]
Thanks.
Can I exclude pages and search posts only?
Thanks for a great plugin.
I have one problem though and that is that I have a “members area” which “hides” some pages for unregistered, using User access manager (http://www.gm-alex.de/projects/wordpress/plugins/user-access-manager/).
The “member” pages comes up in the search results, which is not good.
Is there something I can do to exclude “member pages” in the search results?
Hello Ajay,
It says i need to add the code
I don’t know where? Is it at the function.php?