WordPress Custom Fields Search 0.3.13
This is a relatively minor release including a few small fixes.
There is one relatively major change to the way categories and tags work, it’s a technical detail really that I won’t bore you with the details of, but this change will allow the categories/tags functionality to work on some sites which couldn’t previously use it. However there is a chance that this will break the same functionality on other sites, so please post comments here if this causes issues for you and I will consider switching back to the old method.
I haven’t posted about a release for a while so a quick summary of some of the other changes over the last few releases:
- Various bug fixes
- New hidden constant field type allows forms to be built with pre-specified search parameters
- WordPress 2.8 compatibility (although there have still been some complaints about this, please let me know if anyone has a site with problems that I can test on)
- French translations (thanks to Pierre)
- Ability to search different post types (use this with the hidden constant field to set up page search)
You may also notice I’ve added in a paypal donate link, basically the reason that recent development has been a little slow is because I’ve been too busy working on paid projects. If you like my work and you’d like to help me make a living from (and therefore spend more time) producing open source software then please consider donating.
There is more complete (although slightly out of date) documentation for the plugin here
Category: Wordpress Plugins | Tags: custom fields, custom search, wordpress, wordpress plugin 47 comments »
July 10th, 2009 at 2:48 pm
thanks Don,
How much work is to implement function “all” for custom fields?
I can do what I want even with the setup as it is now, but…
btw have you thought of the AND OR and other operators? If we collect the search widgets it always works as AND operator, Might be useful to have a operator between them 😉
anyway thanks for the nice plugin, it saves us lot of time to do our things. You can be sure you’ll see few bugs on your PP soon.
thx 2046
July 14th, 2009 at 4:13 pm
Hello,
I’m loving this plug-in, but am not able to get it to return any search results. I have read and followed the instructions several times with no luck. Anyone have similar issues and find a resolution? Any help you can provide is greatly appreciated!
July 16th, 2009 at 11:55 pm
Don,
Thanks for the awesome plugin – it seems like such an important thing, but I’ve been pulling my hair out trying to find something that does a multilayer filter operation. I’m not aware of any other WP plugins that do this.
I’m putting together a recipe site and I want to use your plugin to filter results by Season, Occasion (dinner party, weeknight, etc.) and main ingredient. I was planning on using child categories to those categories, but that won’t work with this plugin.
What would it take to be able to name parent categories as a Data Type? That would allow really in depth filtering. Alternately, do you think I could do what I want with custom fields?
Thanks for your help – this plugin will help me a lot.
A
July 17th, 2009 at 1:09 pm
Hi Don,
I wonder if there is a way to highlight search hits and display only hit context (concordance) instead of whole posts.
July 19th, 2009 at 6:42 am
Hi Don,
Many thanks for the excellence plugin
Just for a notice that I create an author field with dropdown, but it shows only the author number, not author name, this because you used the post_author instead of display_name field. So searching post by author name doens’t work.
How can I fix this?
I would appreciated if you can received your help via email
Big Thanks
July 21st, 2009 at 2:24 am
Hi Don,
Have you heard about ClassiPress theme?
Can you give me an idea how to integrate your plugin into ClassiPress?
July 28th, 2009 at 2:36 pm
Hi Don,
I really love your plugin !
I would like to know if you think enabling to connect some fields.
For example, if I have 2 types of custom fields: State and City.
I would have a post with State=California and City=Los Angeles and another post with State=Texas and City=Dallas.
In the actual version of your plugin, if I put a dropdown list for State and for City, if I choose California in State, I would still find Los Angeles and Dallas in City.
Would it be difficult to make it in order that if I choose California, only Los Angeles would be in the dropdown list of City ?
This is what I mean when I talk about connecting fields, I mean creating kind of hierarchy of custom fields with parent and child custom fields.
Hope my idea helps.
Thank you
July 28th, 2009 at 9:21 pm
Hi I try to use it to search custom fields created with flutter..but there is never ever any results …
do you know why?
thanks
July 29th, 2009 at 2:34 pm
Monika. No, sorry I don’t, I’ve set up flutter on a test build and they work together for me. Is there anything else unusual about your set-up?
2046, cna, Adam, Raphael I’ve added your ideas to my todo list. Will hopefully be able to get some of these into future releases.
Samiha, noted, I’ll have a think about ways to fix this.
Michael, no I’m not familiar with the Classipress theme, there are instructions here for installing the plugin though:
http://www.don-benjamin.co.uk/projects/foss/wp-plugins/wp-custom-fields-search-03/#toc-quick-start-guide
Thanks,
Don
July 30th, 2009 at 11:21 am
Hi, Don! I cant say how much I thankful to u for this plugin!!!
For my new project (digital library) it’s very imporant to make data selection search… But is it possible for key words field (for example drop down menu) and category field to choose not only one item (category or tag) but a few? For example, I have such tag-list: “cases”, “best practices”, “articles”, “presentations”, “2006”, “2007”, “2008”, “2009”, “english”, “french”, “spanish”, “italian”. I want to have data selection having following tags: “cases”, “2008”, “french”. How it can be achieved?
July 30th, 2009 at 12:55 pm
Oh, and one more question! How to display subcategories list (which belong to one category) in drop-down menu??
July 31st, 2009 at 9:39 am
Hi, just a question as i’d love to use this plugin. Whatever I try, i keep getting: “Sorry, but you are looking for something that isn’t here.”
(downloaded your plugin today)
Last try was:
data type – custom field
data field – picked one from pre populated list
widget – drop down
compare – words in
It does what it’s supposed to do I guess, I go to the frontend, pick one of the options in the widget, hit search, and get
Not Found
Sorry, but you are looking for something that isn’t here.
What can I do to make it work?
The url it produces looks like this:
http://www.mywebsite.com/wordpress/?search-class=DB_CustomSearch_Widget-db_customsearch_widget&widget_number=2&cs-Gepubliceerd_in-0=esta&search=Search
Thanks!
(sorry for cross posting, but maybe you’re following this more than the other post…)
July 31st, 2009 at 4:58 pm
Hi Don,
Do you have any examples of sites that use your plugin?
Thanks,
Nicky
August 2nd, 2009 at 4:40 am
Hi Don,
Because we will have hundreds of returned results, is it possible to display the EXCERPT, instead of the entire post ?
Thanks for the great work so far.
Len
August 3rd, 2009 at 12:33 pm
ok I try it on an absolute new installation -only flutter and your plugin
thanks
August 4th, 2009 at 8:27 pm
Am I really thick or is there no way to implement a category not equal to condition?
August 5th, 2009 at 10:35 am
Thanks!!! Really the perfect search engine for my vino database.
Please extend the plugin with translation or custom text for the drop-down “ANY”-Option and some settings for the styling.
August 8th, 2009 at 1:23 am
Your latest version always returns no results on our site. Can I download the previous version?
Also, can you replace the_content() with the_excerpt(), so that only the except is returned ???
Otherwise, great work.
August 10th, 2009 at 9:43 am
Ekaterina:
I’m not %100 sure if I understand what you mean, I think if you create multiple selects all with the tag datatype this should allow you to filter by multiple tags. You would need to set which options appear in the dropdown using the drop down options field (something like “:ANY,2006,2007,2008,2009”. Let me know if this doesn’t work.
There’s no way, at present, to show all sub-categories of one category, but you can manually set the options, as shown above.
Lex:
I’m not sure, that all looks correct, can’t really say what the issue is without seeing the admin section of your site (or at least the frontend, I’m guessing it’s not really called mywebsite.com) if you want to send me either of these details by email to don@don-benjamin.co.uk please do.
Nicky:
Not any that have consented in me posting up their addresses, any-one else want to post their url?
This site uses it, but there’s not a massive amount of content here yet.
August 10th, 2009 at 9:44 am
Yash:
No, at present there is not, I haven’t thought to include one, I will try to put this into the next release.
Michael:
Unfortunately my language skills aren’t great. If you feel like taking the time to make a German translation of the plugin, please send me a copy of the wp-custom-fields-search.pot file from the plugin with the “msgstr” values filled out in your language and I will include it in a later release. Allowing custom text for the “any” option does seem like a good idea, I’ve put this on my todo list, in the meantime a workaround (although not ideal) would be to manually put all the options you need into the list as follows “:ANY,Category 1, Category 2, Category 3”.
Len:
The plugin should use the search template from your theme, in my theme this is called search.php, although I think if this file is not there it defaults to index.php . So you would need to edit this file to change the_excerpt to the_content.
Regarding the blank results pages, i’ve had a quick look at your site and it seems to be working now. Have you downgraded the plugin? Or did you find the issue? If you’ve downgraded the plugin would it be possible for me to take a look at your admin interface or database, to see if I can work out what the issue might be?
Thanks All,
Don
August 10th, 2009 at 4:45 pm
Yash: I just had a go at implementing the “not equal” functionality, it’s more tricky than I thought.
At present if you use the “Not Equal” comparison for categories it will return any post which is in any category other than the selected one. So if your post is just in category A. And you search for category not equal to A, you won’t see that post. If the post is in category A and B, you will see it because it is in category B which is not equal to A.
I’ve commented it out in the code as it’s not really working correctly but if this behaviour does fit with what you need it’s on line 303 of wp-custom-fields-search.php in the latest version, you just need to remove the slashes at the beginning of the line.
Getting it to work correctly would require some fundamental re-organisation of the code, so I will leave this on the todo list for now.
August 10th, 2009 at 5:24 pm
Thanks very much for taking the time to look into the not equal issue. For my purposes the categorized items I am looking to exclude will only ever be in one category so I should be good to go! Thanks again.
August 20th, 2009 at 6:05 am
I created a drop-down search box using the custom fields. The custom fields I created are price ranges (1M – 5M, 6M – 10M, 11M – 15M, 16M – 20M). The search box works great. My only problem is how do I customize the arrangement of the drop-down options from lowest to highest? Right now, it shows like;
11M – 15M
16M – 20M
1M – 5M
6M – 10M
Thanks a lot!
Jonathan
August 20th, 2009 at 10:15 am
Jonathon:
At present the plugin sorts the values alphabetically which puts 16M before 1M. I’ll have a think about your problem and see if I can think of a better way to manage this. In the short term there is a possible workaround. You can specify the values manually, so in the DropDown Options field put the value “:ANY,1M – 5M,6M – 10M,11M – 15M,16M – 20M”. If you add new ranges though, you will need to add these into the list.
August 31st, 2009 at 1:41 pm
That must have been one of those “computer glitches” because I had not changed the code/version, and all of a sudden it’s working – and beautifully too.
Just struggling with what to change to make it return search results in the same template as the normal search on my theme (Atahualpa). You kindly said “The plugin should use the search template from your theme, in my theme this is called search.php, although I think if this file is not there it defaults to index.php.” I don’t have a search.php, but there is a searchform.php in the ‘ata’ theme directory. When I copy this & rename to ‘search.php’ in the ‘ata’ theme directory, the result is a single search input box and the rest of the page disappears. Could you give me another hint where I might look to change the results to be consistant with the theme’s seearching/sorting.. ?
September 16th, 2009 at 6:08 pm
Hi Don,
Any news on how to list author´s name in the dropdown?
Would be of great use to me. Thanks!
Congratulations for an excelent plugin!
February 1st, 2010 at 3:20 pm
Hi, greatest plugin, really!
The only thing i miss is the opportunity to look also inside the_excerpt and not only in the_content.
I had a lot of info in the excerpt field, but not in the_content, there’s a way to have the search engige looks also in the excerpt?
thx you!
June 11th, 2010 at 10:39 pm
Hi,
Can you please guide me how to implement the 1 line horizontal search box that look like this:
[Key Words text box][Category drop down][search button]
Your plugin is great im willing to donate if you can help me with this.
July 30th, 2010 at 4:32 am
Hello Don,
This has been a very useful plugin.
However, my custom template requires that a banner show depending on the category/page you are in and by default should show a certain banner. However, the search results after submitting the form doesn’t show ANY banner at all. So it seems like the search results are in a sort of limbo where the my banner loop doesn’t recognize to show a banner at all.
http://domain.com/?search-class=DB_CustomSearch_Widget-db_customsearch_widget&widget_number=preset-default&cs-Width-0=5-10.99&cs-Length-1=5-10.99&search=Search
I have index.php and search.php using the same template/banner loop and they work fine.
Any help/advice would be greatly appreciated. Thanks for you time.
August 20th, 2010 at 11:12 am
hi, i used the widget but i have nog widget background?
can someone help me?
September 10th, 2010 at 8:46 pm
My English is bad I feel, it. Plugin is ESPETACULAR, I work it installs since it and admitio several reforms to use it customized with Great Real estate. I must change ” Any” by ” Todos” and not entendi what it said to him to Miguel.
As I can show another format of result page. Now I show the results like a page of blog, I to show something similar to the index of great real estate
September 10th, 2010 at 9:00 pm
Pardon, replaces it to Any in line 374 extra-search, that this solved, itself fighting with the listings, thanks
April 21st, 2011 at 10:46 pm
Is there a way to hook the custom field search into the search meter plugin. Right now search meter does not register the searches.
Thanks
July 17th, 2011 at 11:52 am
Hello!
Thank you for this wonderful plugin.
I was wondering if there was an easy way to assign different search templates per search form created using your plugin?
Cheers!
Mike
July 24th, 2011 at 8:06 am
Hiya – fabulous blog post.
Does someone use cheaper SMS message marketing services for stores at California than 12stores.com? They only cost nine dollars / four weeks which is not much, however 1’ve 2 provide 4ish more options for my organization. Pls reply
September 13th, 2011 at 9:54 pm
Is there any way to sort by custom fields?
December 27th, 2011 at 6:39 am
Could anyone help me with the code to show search suggestions while user typing? Thanks.
December 30th, 2011 at 11:17 am
Hi,
anyone help me to show default checked radio option. how to implement.
Thanks
Ajinkya…. 🙂
February 2nd, 2012 at 10:59 am
Hello,
can anybody tell me what is the procedure of setting up .mo file for this plugin?
I wasn’t able to find explanation for that anywhere.
Thanks,
Veljko
June 2nd, 2012 at 6:58 pm
WordPress Custom Search Plugin
September 11th, 2013 at 4:38 pm
Hello,
Please let me know if it’s posible in the free or premium version to customize the search field for the category.
For example, if somebody go to the Auto category, the search fild are for this domain ( KM, brand, model, years, etc.. )
If somebody go to the Real Estat category, he wil have another search fild ( room number, location, etc… )
Please let me know if you have any sugestion for that…
any ideea will be the best for me right now.
September 13th, 2013 at 9:18 am
Hi alin,
I’m afraid that is not possible at the minute, although it’s a good idea and I’ve put it on the list for future versions.
For now I think the best bet would be to build something in JavaScript to achieve the same effect by modifying the search form in the browser. e.g. hiding/showing different fields depending on which option is selected.
If you’re not comfortable developing JavaScript yourself, please get in touch with me at don@webhammer.co.uk and I should be able to put something together for a small fee.
Thanks,
Don
November 26th, 2013 at 10:04 am
cause, were legitimate protesters. It is the
burberry scarf cheap http://www.lifeartpeace.com/cheap-burberry-scarf
August 26th, 2014 at 2:09 am
I am imƿressed with this site, real I am a fan.
October 2nd, 2014 at 9:45 am
Pretty section of content. I just stumbled upon your site and in accession capital to assert that I get actually enjoyed account your blog posts.
Anyway I will be subscribing to your feeds and even I achievement you access consistently rapidly.
January 21st, 2015 at 5:56 am
The bottom line is to make a few changes to the theme in order to transform the
blog into your unique non-blog site. Truly, a blog can easily be called the best way to earn online.
That’s it, now go back to your blog’s home page and check it out.
July 24th, 2015 at 3:59 pm
it is look like the custom search have improve a bit, hope it will better and better