WP Custom Fields Search 0.3.4

This version doesn’t add much new functionality but does fix a bug whereby files could not be edited in the theme/plugin editors while the plugin was installed.  Thanks go to Florent for pointing that one out.

I strongly advise all users to upgrade as soon as possible.

This also includes the functionality to place searchforms in page and post content.  See the presets section (Settings > WP Custom Fields Search) for an example tag.  Thanks go to Ibrahim for the suggestion.

For instructions on using the plugin please see the 0.3 release notes

Category: Wordpress Plugins | Tags: , , , 41 comments »

41 Responses to “WP Custom Fields Search 0.3.4”

  1. baron

    Works great, thank you

  2. be advanced - WordPressで、カスタムフィールドを利用した高機能検索プラグイン

    [...] 「WP Custom Fields Search」 は、すべてのカスタムフィールド、カテゴリー、タグを対象とした検索機能を追加できるプラグインです。 [...]

  3. Redsoxmaniac

    This is a much needed plugin. There has to be more functionality on both the category, tags, and custom fields side and it seems like you are doing a great job. I will keep in touch on how it works on my site.

  4. Steve

    Hey, is it possible to add the fuction to search multiple custom fields with one search, not only one?

    btw: Great job!

  5. Don

    Hi Steve,

    Not at present, a few people have asked for this functionality though so I will be trying to get it into version 0.4. I’m a little busy with other projects at the minute though so can’t really promise when that would be.

    Thanks,
    Don

  6. Steve

    That would be awesome!!

    Im looking forward to v0.4 :)

  7. Enrico

    Graeat Plugin, it solves exactly what I need, but one: Is it possible to search between multiple sub-categories? I’d need to have multiple dropdown fields each with “parent” categories as titles and children categories inside.
    Thanks in advance.
    E.

  8. Jose Antonio

    Hi, am sorry for my English is not very good.

    I get the following error when attempting a search result that does not have:

    “There is no entry. Want to try another search?”
    if(function_exists(’get_search_form’)) get_search_form();

    I would be very grateful if I can help solve the problem.

    Thank you very much and congratulations for the plugin.

    Greetings from Spain

    Jose Antonio

  9. Berardo

    Anyone tested the plugin with MySQL 4? Seems not working.. with MySQL 5 works great. Please let me know

  10. Jose Antonio

    Thanks for your reply. The version is 5.1

    Greetings

  11. Don

    Hi Jose,

    Sorry for taking so long to reply. As far as I can tell that code doesn’t seem to be coming from this plugin. I would guess you would need to check your theme for problems. The problem will probably be in a file called search.php in the theme directory.

    Thanks, Don

  12. Don

    Berardo,

    No I haven’t tested it for MySQL 4 compatibility yet, I will try to test this before the next release.

    Don

  13. Stephen

    Is there some way to make the category lister not check for posts there, I would like the dropdown to list every single category not just the ones it thinks have posts in it. I tried using the comma method to list that but that never returns anything from the category.

  14. Don

    Hi Stephen, the search uses the same method of matching posts to categories as is used to populate the drop down list. So if the drop down list is not showing any categories then nor will the search even if you force it to show the categories.

    I can’t really tell what the problem is without looking at your database, but I have this alternative version which worked for another project, could you give it a try and let me know if it helps? If it does I might merge it into the stable version.

    Thanks, Don

    http://www.don-benjamin.co.uk/files/wp-custom-fields-search-categories.zip

  15. Gab

    Cool plugin! :)

    I have added 2 comparisions: “At least” and “Up to” adding these lines:

    “UpToComparison” =>__( “Up To”,’wp-custom-fields-search’),
    “AtLeastComparison” =>__( “At Least”,’wp-custom-fields-search’),

    AND

    class UpToComparison extends Comparison{
    function addSQLWhere($field,$value){
    return “$field = ‘$value’”;
    }
    function describeSearch($value){
    return sprintf(__(’ at least “%1$s”‘,’wp-custom-fields-search’),$value);
    }
    }

    The rusult is find in dashboard but the fields don’t show up in website.

    ALSO…

    Are u planning to have a cutomizable CSS? The way both dashboard and search form appear is pretty bad. I am using 2.7.1 MU and it really doesn’t look like in your screenshots.

    thanks!
    Gabriele

  16. Laura

    Hi Don,

    So this plugin searching only posts in the search results, not pages. Am I correct? If so, is there a way to get it to show pages too?

  17. FlyFro

    Hello.

    I’d like to use this great plugin on my new website.
    Everything works fine, but is there a way to exclude several categories or childcategories from custom search?
    Or force some to be not shown in the dropdown fields?

    Thank you very much – and thanks for the plugin!

    jan

  18. Isaac

    First of all this is an amazing plugin! Thanky ou, but I have a problem:

    When I use the widget and I put in my sidebar, this is not inside a border like all my other widgets, it is without border and I don’t know how to do it, after looking and looking, to make this plugin inside a border, to look like the rest of the blog. Any help will be welcome.

    Thank you!

  19. wolf

    Hi Don,

    can you parse out commas in search keywords?
    For example searching your site here, entering the search term “fields, search, public” doesn’t yield any result, whereas “fields search public” works perfectly fine. It would be great if your plugin parsed out all invalid search chars?!
    Thanks
    WOLF

  20. Don

    Gabrielle, glad to hear you’re pushing the boundaries with it. I’m not sure i can help without seeing the modified source code though. Do you need to add the fields to the search form through the admin interface?

    Laura, I do have the code for doing this I just need to build an admin interface for it. I will try to come up with a work-around soon if possible, but otherwise am planning on putting this functionality into version 0.4 of the plugin when (eventually) I find time to put this together. Sorry to keep you waiting.

    FlyFro, have a look at the instructions at the link below for setting the options in drop down lists. The interface isn’t the nicest at the moment but it should be possible to set-up the list as you want it.
    http://www.don-benjamin.co.uk/wordpress/projects/foss/wp-plugins/wp-custom-fields-search-03/#toc-setting-up-the-fields

    Isaac, it’s difficult to say what the problem is without a url to look at. If you have any suggestions for how I could change the html/css to fit in better with your theme these would be appreciated.

    Wolf, that does sound like a good idea, I’ll try and push that it into a minor release later in the week.

    Thanks,
    Don

  21. Matthew

    Hey Don,

    Thanks for the excellent plugin.
    Is there a way in parsing commas and money symbols?
    Take a look at my estate agent example:

    http://www.lifeofstrange.com/property/

    All the search fields work except the Price, putting just the number in the custom field without the pound and comma symbol seems to work.

    Any ideas?
    Thanks in advanced.

    Matthew

  22. Pierre

    Hi,
    First of all, thank you for your work.
    I have one question : how can I use the .pot file with my translation ?
    Is there an attribute to set somewhere ?
    Let me know.

    Thanx
    Pierre

  23. Ugur

    does not work with the new version of wordpress 2.8

    the place where “Data field” is, does not showing after selecting the “Data Type”.

  24. Ugur

    you are the best

  25. Pierre

    Hi again,

    Still haven’t found how can I use the .pot file, but I have another question :
    How can I use some rewriteRule to link to results page ?
    eg.
    instead of
    ?search-class=DB_CustomSearch_Widget-db_customsearch_widget&widget_number=preset-default&cs-City-0=Los+Angeles&search=Search
    something like that
    search/City/Los+Angeles

    I have write the rules, and the cs-City-0 value is well recognized (selected attribute is on the right value -the form is always in the sidebar) ), but I have a 404 page

    Any idea ?

    Thanx

  26. Don

    Piere: Not sure about the rewrite rules, are you trying to create a link to the search results? Or trying to rewrite the url that the form takes you to?

    With the pot file, I’m not entirely sure how they work, but thought that translation was probably a good idea so I created an english one. If you send it to me don@don-benjamin.co.uk I will have a fiddle and see if I can make it work.

    Thanks,
    Don

  27. Pierre

    Hi,

    Thanx for your answer Don.
    I’ll send you the pot file with french translation this evening.
    For the rewriteRule, that’s exactly what I’m trying to do : “create a link to the search results”

    Any idea ?

  28. Ivan

    Hi!
    Thanks for your job.
    Gab left here his code modification with “At least” and “Up to” variants. How it can be done? Or how to change “less then” on “up to” and more then on “at least”? For example more then 3 including 3 or less then 10 including 10.
    Sorry for my bad english.

  29. Jonah

    This thing rocks. ROCKS.

    I do need PAGE search functionality though. Any idea when we can get that?

    THX.

    BTW, if it is a matter of payment, I would be interested in paying you for your time.

  30. Marilyn Langfeld

    Thanks for this great plugin.

    I’m working on a food and wine site, with taxonomies for foods, wine, beer, spirits. I don’t see how to set up categories or even custom fields that would allow me to select a subset for a particular search.

    For instance, in the wine section, she would like a search with fields for: country, region, appellation, vintage, vintner, price. That would be fine, except that other sections will have different set of fields. If I set all the search terms as categories, the list is too long, with many extraneous terms per type of beverage or food. I’m not sure if using custom fields would work.

    The goal would be to have different search boxes on different pages, one for wines, one for foods, one for beer, one for spirits.

    Is this possible? What do you suggest?

  31. Mike

    Great plugin! Would be helpful to have an option for multiple check boxes rather than just radio buttons.

  32. Pete

    Does this plug-in work with Wordpress 2.8? I am unable to get it to return any post results.

    Any help you can provide would be greatly appreciated. Thank you!

  33. JEM

    Thanks for this great plugin.

    And How To Hide [DB Wordpress Plugins] WordS,

    Is it Be Hide?

  34. Don

    Pete,
    I think the plugin should work with wordpress 2.8, I’ve certainly got it working on a few sites although obviously it’s not as thoroughly tested on this setup as it is on the more mature releases. Could you try this version http://www.don-benjamin.co.uk/files/wp-custom-search-categories.zip and let me know if that helps?

    Thanks,
    Don

  35. Pete

    Don,
    Thanks for the reply. I downloaded, installed, and tested the plug-in from the link you provided and unfortunately, it did not work. I did however come across something interesting…

    If I only place one value in the drop down box, the search returns the proper posts. If I place more than one value (each separated by a comma), the search returns no results.

    I found that interesting and hope it may be something that can be resolved in the near future. Thanks for your help and I look forward to your next reply! :)

  36. Pete

    Don,
    Scratch that last reply. If there’s more than one value in the drop-down menu, it only returns posts for the first value. Any value after the first comma returns no search results.

    Thanks,
    Pete

  37. Boboc Ionut

    Hello Don,
    Congratulations on your plugin, i put this on a travel site http://www.abctours.ro and when i try to search custom fields for prices i get no result , can you tell me if i’m doing something wrong ?

    all i get is “Keyword not found, please try a new search.” if i select any from the combobox, i receive all the results as expected

    Thank you for your time

  38. Don

    Boboc: The release I put out yesterday had a bug in it which has broken custom fields search. Hopefully if you get today’s version you should be okay.

  39. fatih

    great work!

    we are waiting for ver4.

    thanks

  40. icecubejackal

    How to apply the search code in my wordpress template not in post or page or widget, i want to put in anyway in my template.

  41. Marco

    Hi,

    Thanks for the plugin. Works nicely.
    Just one question. I have 5 main categories and some of those categories have subcategories. How make a drop down for those 5 main categories but still have search results returned for the subcategories of that main category. For instance, Property for Sale is main category. Villa/House is sub category of Property for Sale. Now the drop down will show Property for sale and the search should return ALL results for property for sale, even if the post is in a subcategory Villa/House.

    Help is appreciated.


Leave a Reply



Back to top