About Jsearch2
![]() |
Saturday, May 21st, 2011 (10 comments) |
Why Jsearch
The original inspiration for Jsearch was a page where I wanted to upload many pictures and then be able to find them by combining categories to get just the right picture. Imagine my disappointment to find out that you couldn't combine anything in WordPress!
Since I couldn't find any plugins that solved the problem, I wrote up a little hack that used the query_posts function of WordPress which has the power to combine multiple terms, categories and tags for advanced searches, but isn't utilized by standard WordPress functions.
At first I created only a bunch of checkboxes next to the category listings to allow multiple category search, but I realized that if there were a user-friendly front-end to the query_posts function, I could do a lot more.
The next two iterations of the search worked on this principle and tried to make a simple to use and pretty interface that allowed the selection of search criteria and fed it into query_posts. The first was an ugly mess and the second was prettier (since I learned to use Jquery) and more robust, but still clunky in many ways.
Version 2
Version 2 was a major upgrade for several reasons. First, I simplified and minimized the interface. Version 1 is what I used to learn Jquery, but in version 2 I actually used it effectively:
V2 also gets rid of the need to "generate a url". Because I tried to get fancy and use AJAX instant updating, the search was complicated to bookmark and wouldn't navigate well (when paging, you couldn't hit the back button and have it go to a previous page). I abandoned that idea and went to straight page reload for each search.
A major improvement to v2 is based on the query. Until now, I had used the WordPress search functions in order to maintain compatibility and to avoid having to do the work of creating queries myself!
This time, I stopped whining and dug deep to remember how to do advanced queries and found it to be much simpler than I remembered. I won't promise that the new query is faster than what WordPress offers, but it now searches both page/post comments and custom taxonomies!
You're welcome
Focus on Usability
In every iteration, I've used the feedback and experience I've received and finally decided on this design:
Besides streamlining the search dynamics between keywords and categories and tags, this is easier and faster to use in nearly every way.
More than anything, I tried to make it as simple to use and understand as possible.
A final word
So in v2.5 I finally feel comfortable releasing this as a real plugin on the WordPress page and will probably do so eventually. For people who've been using it through the iterations and seen what I've done, they know I don't necessarily fix or update too often, though I try as hard as I can.
If you do find something that needs to be fixed or updated or would like to request additional functionality, just let me know in the comments. I can't promise speed, but as others have learned, good things come to those who wait (click Jsearch Setup below to download and install Jsearch).










Hi,
I searched days for a plugin with this functions but unfortunately it doesn’t work with Headwaythemes (the search widget in the sidebar just doesn’t do anything after clicking on “go”.
Any idea why?
Cheers
Thomas
I just saw that you have to rename the the jsearch folder to “jsearch”!
Now it works but the jSearch page template doesn’t get along with the Headway layout system (based on “leafs”)…
Awesome plugin though!!
Thomas
I also have similar problems with adding it to Headway…
Is there any solution?
I have tried adding it to a Leaf but that does not seem to work – I still get this error:
Fatal error: Call to undefined function jsearch_control() in /home/zanedickens/client.webdesignwarehouse.co.za/eaturgreens/wp-content/themes/headway-208/library/core/functions.php(64) : eval()’d code on line 17
I’m not sure what you mean by either Headway or Leaf. Are those other plugins of some kind?
And how can i get it and have a try? Have i overlooked the most important thing?
Hmm. Maybe I need to make it more obvious, but there’s a link up there to the “Jsearch Setup” page where you can get it
Howdy would you mind sharing which blog platform you’re working with? I’m looking to start my own blog soon but I’m having a hard time making a decision between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your layout seems different then most blogs and I’m looking for something unique. P.S My apologies for getting off-topic but I had to ask!
I just use WordPress (hence the WordPress plugins and such). The layout is different because it’s a custom theme. Once of the great things about WP is the ability to style it any way you want (if you have the skill to do so). If you don’t know how, you can download themes from the Internet and work within those.
Weird! I tried to find Jsearch in the WordPress plugin site…not listed. I tried Jsearch2 also! Same results.
Do Am I missing something?
Roger Pilon, Editor
The Planet Fixer Magazine
No you’re not wrong. I never actually submitted them there. After I created the plugin, I didn’t think I’d have time to support it more than I do. Maybe I should take another look at that since it could be good promotion for my site, but considering my schedule for the next few months, I’ll probably wait at least a little bit longer.