WordPress Custom Fields Search 0.3.15

Apologies to everyone who installed yesterday’s release (0.3.14), this mornings release (0.3.15) should bring back the custom fields functionality.  I was obviously a little premature in marking that one stable.  Thanks to Vytautas for pointing out the issue.

Also, the previous release fixed some problems with the method of including search forms in posts and pages.  To fix this bug though I have had to change the syntax for including presets in posts, please check the “settings/wp custom fields search” section of the site to see the new syntax.  The old method is now deprecated (meaning it works for now so that everyone has a chance to update, but I will remove it soon.)

Basically what was:

[wp-custom-fields-search 1]

Is now:

[ wp-custom-fields-search preset="1"]

Category: Open Source, Wordpress Plugins | Tags: , , 192 comments »

192 Responses to “WordPress Custom Fields Search 0.3.15”

  1. john chandler

    Hello Don,
    Thanks for this fantastic plugin…it’s perfect for a site I’m trying to build. One question…will it work with pages as well?

    I’m creating pages that are using custom tags, but when I run a search, I’m getting no results. Is my use of pages the problem? Is there a way for it to search custom fields in pages as well?

  2. Jonathan Casuncad

    Useful plugin. I’m very thankful. I have a few question though;

    1. Why does the search results page have the headings below even if there was a result found and showing on the results page?

    Archive for Not found

    Sorry, no posts matched your criteria.

    2. Can I show all the posts that match the result on one page instead of having only 1 result and a Next Page link to the next result?

    Thanks again!

    Sincerely Yours,
    Jonathan Casuncad

  3. Don

    john: Page search functionality is not quite there yet, or at least it’s not as easy as it should be. If you put in a new field with the data type “Post Type” and the widget “Hidden Constant” and the constant value “Page”, this should start searching pages instead of posts.

    jonathon: I would guess all these issues are related to your theme. My plugin doesn’t make any attempt to display the results, it just puts them into the “search” template in your theme. This file should be called search.php in your theme folder, or if this isn’t there it will show the file index.php.

  4. john chandler

    Works perfect. Thanks for the pointer.


  5. kay

    i just download and play around this plugin with TDO Mini Form plugin
    but when im using radio button
    i get many unknown information in my radio button list as below:


    can you please take alook at it?


  6. john chandler

    Plugin is working great, though I’m trying to troubleshoot one issue I’ve come across.

    I have a search that involves three custom_fields. In my sample data, I’ve found that if a post/page doesn’t have a value for one of those fields, it won’t turn up in any search no matter what. Is there a workaround for this?

  7. Jeromy

    I’m using the Flutter plugin to make custom write fields (which are added to the custom fields table in the db) – I’m able to see them all in the custom fields dropdown when adding a new search field, but even though i have posts with content in those custom fields, I still can’t get any results when I search for them. Every search just comes back with no results.

  8. Jeromy

    I think I figured it out – took some tweaking here and there but I’m getting the hang of it

  9. leen

    Hi Don,

    Thanks very much for this plugin and the work you ‘ve done!

    Also for your comments to Johns remark, I had the same problem : now resolved.

    Only this question: here you can see my testing website with wordpress cms: http://www.ballyhoo.be/wordpress/
    Is it possible to remove the display of ‘All’ for the “Hidden Constant” search button?

    Best regards!
    Leen l Belgium

  10. Scott Munson

    …”Also for your comments to Johns remark, I had the same problem : now resolved….”


  11. Scott Munson

    Hi Don,
    Great plugin! Feel free to include my site as an example when it’s ready – I have alot of fields.
    But one issue. After a search can all the fields please be returned to ‘ANY’? – if not how can I put some instructions in between header and first field telling user to reset fields.

  12. Berardo

    Hi Dan,
    another suggest: add a joiner for custom taxonomies and when is selected in data field add a dropdown menu to choose taxonomie name (e.g. actors, genres, directors).

    Power to search!

  13. Steve Coates

    Just wanted to say thanks for a great and very flexible plugin Don :-)

  14. Ria

    Hi Dan,

    Your search plugin is great btw!
    I’m using it for a clients site backend, and I’m wondering how I could work in a ‘text cleaner’ to the keyword search?
    As in – at the moment people can enter characters like quotes and symbols, and I’d like to be able to remove them for security reasons.

    Any ideas?


  15. flosse

    Great plugin! I searched hours and hours for a solution like this.

    Thank You!

  16. mojoflyer

    my site: http://www.carmamak.com

    I’m using custom search to do search by:
    1)Car Make(Category)
    2)Model(Custom field#1)
    3)Year(Custom field#2)
    3)Price from(Custom field#3,Text input,At Least)
    4)Price to(Custom field#3,Text input,At most)

    My post entry has fields:
    1)Category(Car Make)
    2)Model(Custom field#1)entered as text
    3)Year(Custom field#2)entered as text
    4)Price(Custom field#3)entered as text

    My problem is that when i run a custom search for price range, e.g.
    Price from: blank (at least)
    Price to: 30000 (at most)

    I get results of post with price more than 30000, for example posts with Price:259000 , 220000 also get shown in search result.
    Why is it so? Does the “At most” check for the all digits or only just the first 2 digits? It seems like only the first 2-digits is checked.

    Is there a fix to this problem?

    I’m using version 0.3.16, wordpress version 2.8.4

  17. Don


    Apologies to anyone waiting for replies here or by email, I am currently massively over-run with work and don’t have time to respond to you individually. I will try to look into all your requests/questions as soon as possible.

    Thanks for your patience,

  18. Eric

    Whenever I perform a search, the website template shows up as if it were the homepage. Is the a conditional tag I can use to force WordPress into thinking the WP Custom Field Search results page is a subpage, rather than a homepage?

  19. Craig

    Hi Don,

    Great plugin, this is something I have been looking for!

    Just a quick question…

    I have a number of categories, all with sub categories under them.

    I was wondering if it was possible to have multiple category fields, but then select which main category is shown there (rather than it list them all)

    So for example:

    Field 1 = (main cat) Product type: (sub cats) Electical, gift, toy, etc.

    Field 2 = (main cat) Price range: (sub cats) 0-100, 101-200, 201-300, etc.

    Maybe this could work in the same way you can include and exclude categories in the category list in wordpress?

    No rush with any help if you are busy and it is not straight forward.

    Many thanks!

  20. Antonio


    Thanks a lot for your plugin. It’s super.

    I’m wondering…where are stored the preset which are defined from wordpress back-end?

    Thank you Don¡¡¡

  21. Jesmi

    Hi Don,

    Yes its really great plugin! Using it will sort out alot and really a serach for such kind of plugin is finished with this.

    Thanks alot for sharing such great and for your efforts.


  22. Robert

    Hi there, I have a bit problem I have search on my webpage and I have dropdown fiels with numbers. It is sorted alphabeticaly but the problem is that the sort is like:

    10 000
    11 000
    8 000
    9 000

    = in alphabet number 1 is before 9 = 1 is being shown first but in numbers it should be not about alphabet but about value. Is there any way to change the sort?

  23. Baga

    Great plugin Don! Is it possible to build checkboxes as well as radio buttons?

  24. Mike McAlister

    First of all, thanks for putting this together! Exactly what I was looking for.

    I’m just having one small issue. Usually when you search, you see “Results for ‘term’” or “You searched for: term”. I can’t get WP to return this variable with this plugin.

    If you go to http://www.sixonefive.net/dogwalker/ and try searching “mike”, you’ll see what I mean.

    This may be because I’m using the Classipress theme, but I thought I would ask anyway. Is there a piece of code I can use besides below to give me that variable?

  25. Seborgarsen


    First of all, let me thank you for a great plugin.

    I am using three presets on the same page and that breaks one of them:

    Preset 1 – Top bar quick search (keywords searching all custom fields)

    these are in two divs with a show/hide jquery script:

    Preset 2 – Simple Search
    Preset 3 – Advanced Search, based on Preset 2 preset

    Everything works in Preset 3 except for text searches, drop downs are returning just fine. Even the text fields from Preset 2 are down.

    Any hints?

  26. Seborgarsen

    Nevermind. For some reason Preset 3 had a bug, fixed it by deleting it and making a new one.

  27. Seborgarsen

    I am also wondering where the fields are stored…

  28. Alex van Niekerk

    Hi, first of all, it seems like a great plugin except I cant get it working…

    When i select to search after having chosen an option from my drop down box… it says “None Found”.

    I made a test post with Tags, Custom Fields and included the text in the post. Yet none of the Data Types I selected returned any results… Its really confusing me… Is it maybe not working with my theme or what could be the problem?


  29. Alex van Niekerk

    Oh, i’m using version 0.316 of the plugin and WordPress v2.84.


  30. Andy R

    Great plugin! I’m actually developing a real estate website as well and it’s really handy.

    One thing that isn’t working for me is the Hidden Constant. I have a bunch of drop-downs setup and they work fine, but my Hidden Constant doesn’t seem to be taking.

    Here’s how I have it:

    data type : Category
    widget : Hidden Constant
    compare : Equals
    widget config : category name

    My searches are still always showing posts from all categories, not just the one specified in the Hidden Constant. Am I setting this up incorrectly?


  31. Ervald

    I’ve added Checkbox in the drop down list if anyone is interested.

    Add this after line 507 in extra_search_fields.php

    class CheckboxField extends Field {
    function CheckboxField($options=array(),$params=array()){
    function __construct($params=array()){
    $optionPairs = explode(',',$params['checkboxoptions']);
    foreach($optionPairs as $option){
    list($k,$v) = explode(':',$option);
    if(!$v) $v=$k;
    $this->options = $options;
    function getOptions($joiner,$name){
    return $joiner->getAllOptions($name);
    } else {
    return $this->options;
    function getInput($name,$joiner,$fieldName=null){
    if(!$fieldName) $fieldName=$name;
    $v = $this->getValue($name);
    $id = $this->getHTMLName($name);

    $options = '';
    foreach($this->getOptions($joiner,$fieldName) as $option=>$label){
    $option = htmlspecialchars($option,ENT_QUOTES);
    $label = htmlspecialchars($label,ENT_QUOTES);
    $checked = ($option==$v)?" checked='true'":"";
    $htmlId = "$id-$option";

    $options.=" $label";
    return $options;
    function getCSSClass(){
    return "checkbox";
    function getConfigForm($id,$values){
    return "Checkbox Options";
    class CheckboxFromValues extends CheckboxField {
    function CheckboxFromValues($fieldName=null){

    function __construct($fieldName=null,$params){
    $params['fromDb'] = true;
    function getConfigForm($id,$values){
    return "";

    Add this after line 291 in wp-custom-fields-search.php

    "CheckboxField" =>__( "Checkbox",'wp-custom-fields-search'),

  32. Alex van Niekerk

    If i have created more than one Drop Down selection method the plug in does not work.

    For instance: Cars…

    Car make: drop down list, post field: words in, “Audi,BMW,Porsche”

    No. of Doors: drop down list, post field: words in, “2,3,5″

    And it always displays “None Found”. Yet this is impossible as i have created a post containing both cases and/or more.

    PLEASE can someone help… this isnt making any sense… Its really not difficult to understand, yet i cant get it to work correctly…..


    Thanks in advance…

  33. Alex van Niekerk

    Not Correctly… i mean its not working at all!

  34. Francisco

    Amazing Plugin… Thanks for sharing. Gretings From Chile…

  35. Baga

    @ Ervald:

    Thanks for sharing your code, I tried to follow your instructions but the checkboxes didn’t show up in the search page :-(

    This is the resulting code:

    Label option1 option2

    Could you please help me??? My mail is baga @ bagaweb . com

  36. Baga

    Mmmmm looks like the code i posted doesn’t show up the way i meant it…. Let’s try again:

    Label option1 option2

  37. Baga

    Sorry for the multiple replies, can’t get the html code to be displayed properly :-(

  38. Ryan

    I’ve managed to hack the checkboxes together thanks to a little editing of Ervalds code above. I had the same result as Baga previously but the below works for me:

    class CheckboxField extends Field {
    function CheckboxField($options=array(),$params=array()){

    function __construct($params=array()){
    $optionPairs = explode(',',$params['checkboxoptions']);
    foreach($optionPairs as $option){
    list($k,$v) = explode(':',$option);
    if(!$v) $v=$k;
    $this->options = $options;
    function getOptions($joiner,$name){
    return $joiner->getAllOptions($name);
    } else {
    return $this->options;
    function getInput($name,$joiner,$fieldName=null){
    if(!$fieldName) $fieldName=$name;
    $v = $this->getValue($name);
    $id = $this->getHTMLName($name);

    $options = '';
    foreach($this->getOptions($joiner,$fieldName) as $option=>$label){
    $option = htmlspecialchars($option,ENT_QUOTES);
    $label = htmlspecialchars($label,ENT_QUOTES);
    $checked = ($option==$v)?" checked=\"checked\"":"";
    $htmlId = "".$id-$option."";

    $options.=" $label";
    return $options;
    function getCSSClass(){
    return "checkbox";
    function getConfigForm($id,$values){
    return "Checkbox Options:";
    class CheckboxFromValues extends CheckboxField {
    function CheckboxFromValues($fieldName=null){

    function __construct($fieldName=null,$params){
    $params['fromDb'] = true;
    function getConfigForm($id,$values){
    return "";

  39. Ryan

    Sorry for the double post – its stripping out the HTML which is why Ervalds code didnt work. The full code change can be found at:


    If the link is automatically stripped out of this post just click on my name above ;)

  40. Faisal

    Great plugin!

    Is it possible to search ‘title’ of the post and ‘one of custom fields’ through ‘one’ input box? Can someone help me in this regard.

  41. don

    Hi Faisal,

    No sorry at present this is not possible. This is on my todo list, although at present I’m not finding a lot of time to spend on this.


  42. don

    Hi Alex, Sorry I didn’t get onto this sooner, do you have a url I could look at?

  43. don

    Thanks Ryan/Ervald,

    I’ve added this code into the plugin, (if that’s okay with you?) so it will be included in the next release.

  44. don

    Hi Alex, sorry to take so long getting back to you. Do you have a URL I could look at?

  45. don

    Hi Andy,

    That looks correct. Do you have a url I could look at?


  46. Ryan

    No problems here though it is Ervalds code really so may want to check with him. At present its a little rough around the edges as you have to add one new field for each checkbox – which is a little backwards if you want to offer multiple choices. For example Ive created one field for each colour a user can search for which prints to screen as:

    Colour: [] Red
    Colour: [] Green
    Colour: [] Blue

    I’m going to look into changing this so that multiple checkboxes can be added under one label so it prints as:

    Colour: [] Red [] Green [] Blue

    This is a great plugin, thanks Don :) Its open to a handful of XSS vulnerabilities which I’ll email you about.

  47. Ryan

    Double post again, sorry :) Ignore the above, after looking at Ervalds code I’ve realised that its already setup to allow multiple checkboxes per field added. Simply seperate them with a comma such as: red,green,blue

    Emailed you the XSS vulns. Thanks again.

  48. Ervald


    Of course there isn’t any problem I didn’t do anything. :)


    It works for me + multiple option.

    Maybe you forgot something, or I missed a line…

    Here’s a screen:


  49. Ervald

    It would be nice if Don could add a sorting bar based on custom fields.

  50. Ryan

    Cheers Ervald, yeh I got it working thanks :) Didnt realise the values could be comma seperated in a single field.

  51. Ryan

    @Ervald : Please can you email me a plain text copy of the code you’re using in extra_search_fields.php to achieve checkboxes with multiple options. Thought mine was working but noticed its only searching for one of the checkboxes even if multiple are ticked and cant figure out why.

    The code you posted before had text stripped out by WordPress so would appreciate if you can email it to me at: ryan.malin[at]gmail.com

    Thanks :)

  52. Ervald


    After testing it more I realized it only showed results of the last clicked option… :(

    I was wrong, trying to figure it out how to make this possible now.

  53. Ervald

    Tried separating them by field but it doesn’t work.

  54. Ervald

    Tried retrieving from 2 Categories using Hidden field or fields (tried both) but it won’t work.

    I’m sure Don can help us achieve this.

  55. Ryan

    Both checkbox values are being sent as my URL shows:


    Guessing its only searching for one value as you cant use the same name in a GET clause more than once. Depending on whichever is last in the URL is the one that is searched.

  56. Ervald

    I guess we are back to radio-buttons for now…

  57. sinema

    ohh! thanks for crazy plugin.

  58. don

    Ryan/Ervald I think this could be fixed with a relatively small change to the core code, I’ll try to get this into a new release shortly. Thanks for working to improve the plugin.

  59. Jane

    I’m really struggling with the css styling. I would like my input boxes to left align but for some reason the drop down boxes hitch to the right. Any suggestions?


    Thanks folks

  60. Ryan

    @Don – Thanks :)

    @Jane: I’d suggest you use Firefox, with the Firebug plugin to help you with your CSS styling. Looks like you need to change searchforms.css, around line 15:

    .searchform-label {

    Try changing the width value to something lower than 35%. You also have 5px left-padding on your select dropdowns which is slightly knocking it out of alignment with the text input fields. Around line 340:

    .widget input#s, .widget input.field, .widget select {
    border:1px solid #CCCCCC;
    padding:3px 0 3px 5px;

  61. Baga

    Thanks Don, Ervald, Ryan; you’ve done an excellent job so far!

    Looking forward for a working version with multiple checkboxes. I’m actually looking for something very similar to Ervald’s hotel search.

    I wish I could help but I hardly understand some basic php :-(

  62. Ervald


    As soon as there’s a way to make it work I’ll post a copy of the hotel search setup.

  63. Baga

    Thanks Ervald!

    And Merry Christmas to everyone :-)

  64. Jane

    @Ryan – Thanks for the help

    .widget select { border:1px solid #CCCCCC; padding: 0px; margin: 0px;}

    worked, but I had hoped for a plugin specific styling so that it wouldn’t affect the rest of the template.

  65. Ervald



    .custom_search select { border:1px solid #CCCCCC; padding: 0px; margin: 0px;}

  66. Jane


    That works great. Thanks!

    Any suggestions on how to solve Mike’s question at No. 24? I have the same problem in that the search term is not shown on the results page.

  67. Ervald


    I have 2 different templates for search results.

    1=Custom search (search-accommodation.php)
    2=Basic WP search (search-news.php)

    I’ve edited search.php and put:

    And now the title of search-accommodation.php is something like this:

    echo $num.' search results for "'; the_search_query();

  68. Ervald

    EDIT Sorry the codes didn’t came through…


    I have 2 different templates for search results.

    1=Custom search >(search-accommodation.php)
    2=Basic WP search >(search-news.php)

    I’ve edited search.php and put:



    And now the title of search-accommodation.php is something like this:


    echo $num.’ search results for “‘; the_search_query();


  69. Ervald

    @Jane: Sorry again.

    Check the full code here:


  70. Rene

    Love this plugin!

    I do have one question; I’ve been able to add custom css and get the widget to look like I want but where/how can I style the button?

    You can see it on my site http://gamenightphotos.com

    I’d like to add some padding on the right side of the button as well as customize the look of the button itself.

    Thanks in advance for any help!

  71. Ervald


    .searchform-controls input

  72. Rene


    That helped, fixed now ;)


  73. Fred

    good plugin! im making a search with 2 (or more) presets, how do i make one submit button?

    thanks for the help!

  74. Pekkos

    Hi Don!
    Thanks for a great plugin, I am currently working on an archive project where custom fields search will be the essential way of getting archived items.

    However, since the project site will be in Swedish, I’ve tried to locate where you populate the first dropdown option with the word ANY, since I would like to replace that with something else.

    Good work, really!

  75. Pekkos

    Ok, found it!

  76. Jason

    Hi Don,
    Great Plugin!

    do you have any plans to create a mulitple select option? also, how many is the max number of custom fields that you would recommend making?

  77. prd717

    This plugin is exactly what I’m looking for.
    Thank you so much for your effort.
    I’m using your version 3.16 WP 2.91 firefox 3.5.7
    I have two issues I wanted to bring to your attention.

    1. I’m showing the most recent posts on the home page and showing only the titles. When performing the search I want to change the order_by.
    I accomplished this in my theme’s in index.php.
    if (is_home()!= 1) $posts = query_posts($query_string . ‘&orderby=title&order=asc’);
    I lose this custom functionality with your plugin. Can you advise in the plugin where I can insert to re-activate?

    2. In the widget I tried to add a third field to search by author.
    data type post field
    data field author
    I try the search and no results
    I go back to the config and the data field is gone.
    I tried several times and it doesn’t seem to stick.
    I finally left the data field=all and the search basically works but not entirely correctly. Thought you might want to know.

    Thanks again

  78. Zoe

    Fantastic plugin – thank you, it’s just what i needed!

    One thing I would like to change for my site and i’m strugglng with…i’m hoping someone can help me…..

    In my search form I have a dropdown for category and two custom field dropdowns, however for display purposes I do not show the field label next to the dropdown. What I actually want to do is change the default “Any” option in the dropdowns to display “Any category” etc, so effectively “Any” plus the field label to make it obvious what each dropdown is for.

    Can anyone help me achieve this? I’ve looked in the code but a bit baffled as to how to change it. Thanks in advance.

  79. sebastian

    hi Don!
    1 question :
    How to change the language in it for example?

  80. Ivan

    Hi Don. I need use Is_home() to do something and is_search() to do another thing when you plugin print search result, but search result indentify by is_home(), not is_search. Can you help me? i am realy need it

  81. Julien

    HI Don !

    How i can choose the “order display” of my category drop down ?

    And add a custom class for the sub-category to add some padding to distinguish Main category of Sub category ?

    Please help me
    Thanks a lot in advance

    I think i have to modify something here (extra_fields_search.php line 675) :

    function getTaxonomy(){
    return $this->param(‘taxonomy’,'category’);

  82. Eoin

    Great work Don, thanks.

    I’m trying to use this with flutter, but the dropdown only lists one element of each write panel. Is there something I’m overlooking, or are these two plugins simply incompatible?

    I don’t have a Paypal account, but if you could help I would gladly pay full professional rates.


  83. baga

    Hello Don, Ervald, Ryan, any news regarding the multiple checkboxes? I’d be prepared to pay for this service.

  84. Eoin


    Problem solved, as you probably guessed. I RTFM’d a little more thoroughly. You may delete both my comments as noise if you wish.

    Thanks again,


  85. Amanda

    Hi, and thanks for the plugin!

    I’ve got one question, and one problem:

    Question: Any progress on getting the checkboxes mod to search for all checked values?

    Problem: Until then, I’m using select boxes, but I’m not getting an “Any” option, only the ones I’ve listed. I’m assuming that adding that option in myself will cause it to actually search for “Any” as a value… am I missing a step to have it added automatically?


  86. Amanda

    D’oh, nevemind.

    That’s in the very first FAQ answer in the WP repository. Sorry about that!

  87. Amy

    I’m using your search already for a great idea I had to help the StoryForm community, but I had another idea for my recipe site and I was wondering if you could help me out. Is there a way to make the search exclusive instead of inclusive? Say I wanted to search all posts in a certain category WITHOUT a specific tag. Could I do that?

  88. BAC


    This plugin is almost exactly what I am looking for…

    Quick question:
    I need to filter a certain category out i.e. exclude=20 from the category and custom field drop downs.

    Is this possible currently? Ideally with shortcodes – i.e. [custom-field-search exclude=20]

    Some really cool features I would love to see added to this plugin are:

    1. post count next to each option (with ability to filter post count by excluding posts that are children of certain category’s)

    2. ability to select multiple options from the drop downs with check boxes after each option.

    3. place holder text that is added/removed when the form elements are given focus. (for accessibility validation)

    I may be in a position to make a small donation to aid the development of these features if it will help. Maybe give me an idea of scope and I’ll see what I can muster.



  89. Martin

    It seems that there is a bug in your plugin. I added a list of countries (around 200) as Drop Down Options, but when I save it, the widget disappears from the front page. When I enter only around 20-30 values, it’s OK.
    Do you know how I can fix that?

  90. Martin

    One more question: In my widget users can choose from a drop-down of a list of countries and I have included all the custom fields options manually. Is there any way the user can select “Any/All” in the widget instead of selecting a specific country?

  91. Amanda


    I was confused about that too, but I found the explanation in the first question here:

    Just make the text “Any/All” as your first option, and put a colon ( : ) right in front of it.

  92. Martin

    @Amanda Thanks!!! That fixed it perfectly. Any idea about my previous question? Why does the plugin crash (disappear) after I include a lot of custom field options?

  93. Amanda

    Sorry, I don’t know. I’m a n00b with php, so I don’t know the inner workings of the plugin, I only knew your last one because I’d run into the same thing myself. Hopefully the author or another programmer can step in to help with that. Glad to have been a little bit helpful, though!

  94. fadzril m

    Hi Don,

    How to put and list specific category for dropdown? List down only subcategories name that have post?

  95. baga

    Hello Don, Ervald, Ryan, any news regarding the multiple checkboxes? I’d be prepared to pay for this service.

  96. brian

    Loving this plugin!

    Question: how do I get the search results to display in the default WP way? With this plugin deactivated, search results show up in a title list (and in my case with a thumbnail image). When I activate your plugin, the search results return as a full post.

    Thanks for the help.

  97. Danilo Naranjo

    Hello, I’m from chile.

    I have a question, as I can make the wp-custom-search, the search button is disabled if no income.

    Would greatly appreciate a response.



  98. Wes Gue

    Great plugin,

    Just one problem/question, how do i make the search output go to a page, (ie. search page) right now it just replaces the latest posts on the homepage with the results.

    Thanks in advance!

  99. Donna Vitan


    Awesome plugin so far. Like Wes Gue, I’m wondering how to customize/redirect to a custom search results page.

    I have customized the header banners to correspond to whatever page you are on and the search results for this does not yield the appropriate search results header banner.

    I would also like to add a few content/details to the results page.

    Any help would be greatly appreciated. Thank you.

  100. Kamil

    Hi Don!

    Great plugin! I love it!

    I was wondering if it would be possible to modify it so instead of showing all the search results it would open the first result (like I’m filling lucky on google) because the search that i’m using requires to select every option and there is allways only one search result.

    Please let me know if anyone have any ideas. Thanks!

  101. Jokke


    and thanks for a great plug-in. I was just wondering is it possible to add translation for the labels and the widget name.

  102. สร้างเว็บ

    Thank you for plugin, it’s very useful.

  103. Colm Bennett


    Thanks to Don for a great plug-in :)

    I have been working with this plug-in for the last few weeks and have added various new features, including checkboxes, conditional logic, search order, re-order questions, group questions etc. The details are all in a post on my blog – http://colmb.com/2010/06/changes-to-wordpress-plug-in-custom-fields-search/

    An example of the changes can be seen at http://colmb.com/test-search/ – change the Area question to Dublin to see a conditional logic question added, with checkboxes.

    I have emailed the changes to Don and hopefully he will include some or all of them in a new release at some point. In the meantime feel free to try them, you can download from my blog. Please report any issues on the blog.


  104. Judson Jaurez

    Great job! Can’t wait to start my own blog.

  105. Jokke

    Do anybody know how to make it work with wordpress multilingual plugin http://wpml.org.

  106. Shalon Morlock

    A Fantastic wordpress post, I will be sure to save this in my Mixx account. Have a great evening.

  107. Ryan

    I haven’t tried fixing the multiple checkboxes issue as Don mentioned in an earlier post that he’d fix it in the core for the next release. I’ll be using this plugin again (needing checkboxes) on a new site Im building so will take another look then if Don hasn’t already pushed out an update :)

  108. Cou



  109. baga

    Ryan if you can help you’ll be our hero.

  110. Noel

    Thanks for the very useful plugin.

    Is there a premium version or a way to remove the footer “DB WordPress plugin”? This site is for a client and they don’t care about branding.

    Hope you understand.

  111. Ryan

    Sorry guys, I haven’t had any luck in getting multiple checkboxes to work :( I’ve emailed Don asking for a quote if he can fix it.

    The only way I have managed to get this to work (which was an incredibly poor hack) was to create a new field for every checkbox option (eg, one field for Red, one field for Green etc – instead of having one comma seperated list in a single field). This does work, but it required exhaustive changes to the CSS and template to hide all of the additional labels etc. It certainly couldnt be used on a live site.

  112. ole

    This is a great plugin. Is there a way to sort the search results by title or custom field value?

  113. Ton

    I am trying to decrease the size of the fields in the search form. They are too long. Here is the search form in my style.css but nothing I do is changing the length. I am doing something wrong or not in the right place. Can someone give me some advice?

    /* search form */
    .searchform {
    display: inline-block;
    font-size: 100%;
    padding: 0;
    margin-bottom: 2px;
    .searchform .searchfield {
    /* width: 50px;*/
    padding: 4px 7px 2px 5px;
    color: #999;
    border: 1px solid #888;
    margin-top: 6px;

    .searchform input[type="submit"].searchsubmit {
    background-repeat: no-repeat;
    background-position: 0 0;
    height: 24px;
    width: 12px;
    border: none;
    cursor: pointer;
    text-indent: -999%;
    margin: 0;
    padding: 0 3px 0 3px;

    Here is the actual page.



  114. Tommy

    Don, PLEASE fix plugin for multiple checkboxes.

  115. Ash

    Great plugin ben, is there anyway of changing the plugin so it uses its own independant url when searching rather than piggy backing the root url?

    Is causing a few issues with my template and setup etc…

  116. Adam

    Great plugin! I am having some issues using this plugin with a very large database of about 20,000 posts, searching only one custom field. The results page times out for results over about 20 it seems and renders a blank page. Other than raising the max execute time for PHP, is there anything else I can do or create an error message to prevent the blank page?

  117. Joe McDonald


    I wonder if anyone can help me here as I am at my wits end with this as I am working on a media website for congressional clips and need a functional search:

    1) is it possible to have one field search two custom fields? Right now, unless I am doing something wrong, I can only get one custom field per entry.

    And 2) Able to only search full words. So when you type in AIG campaign does not come up. Is there a use of wildcards ect…

    Any help on this would be appreciated and if someone has experience coding this please contact me at joe@damoclesdesigns.com


  118. Eos

    Okay, I would have saved myself an insane amount of trouble if only I’d discovered this sooner! You’re amazing for having created such a useful script.

    I’m now trying to modify the display a bit. Is there any way to replace the “ANY” in the dropdown with the “Label”?

  119. ompiang

    Cool! Thanks for shared nice info.

  120. Aaron McNatt

    OEM, O.D., I.D., and Length each use a different custom search field but only OEM works. Length takes me to the “Not Found” page and O.D. and I.D result in “Search Results for: All Entries” coming up with all my posts listed.

  121. Andres

    Hy there Benjamin, I wanted to thank you for the widget you created for the wordpress ( custom-fields-search ) because it’s the bomb.

    The only problem I see with it, is that it looks only in the category OR subcategory. It doesn’t look in both of them.

    I will give you an example of what I am trying to say:

    For example I have only one category (CARS) and this has various subcategories ( FORD,MERCEDES,TOYOTA ).

    Lets say that we have information posted only in the subcategories.

    Than in the plugin will set up like this:

    1) First field in the search box
    Label: Category
    Data Type: Category
    Widget: Drop Down
    Compare: Equals or Words In
    Numeric: Unchecked
    Drop Down Options: CARS

    2) Second field in the search box
    Label: Subcategory
    Data Type: Category
    Widget: Drop Down
    Compare: Equals or Words In
    Numeric: Unchecked
    Drop Down Options: FORD,MERCEDES,TOYOTA

    Ok than. If we want to look for results in the FORD category for example, than this would not be possible, because the plugin looks only in the category or subcategory, and not in both of them. Better said, if it can’t find the word CARS in the subcategory name than it won’t list the results, and if can’t find the words FORD in the category name than it won’t list the results.

    I think this plugin should have a subcategory option in it somehow added to it or at least link the two fields 1) and 2) together.

    I hope you understand what I am trying to say.

    Can you do it ???

    Many thanks.


  122. Nancy

    Very interesting, thank you for your sharing

  123. Marcelo

    Hi Don,

    Great plugin! Quick question:

    When I make any search I am getting my FIXED POSTS on top of all other search results regardless whether this fixed posts match the search criteria.

    Any ideas?

    Thanks a lot in advance.


  124. Stefan Holm

    Almost perfect just what I was looking for, one problem is the language, is there some easy fix to change it to swedish now some characters look very strange in the dropdown.

    Tried to put a swedish .mo file in the dir put that didnt help…

    Otherwise it was perfect!


  125. Nicolas

    Hello Don benjamin, how are you?
    I want to ask a question, where in de CSS I can delete that text that says DB WordPress Template?

  126. Beth

    Thank you so much for building this plugin! I have been searching for months for this functionality. You made my day!

    Thanks for all your great work!

  127. Vladislav

    Hello Don!

    Thanx for providing such a functional tool. It is really great

    I am just wondering if there is a way to show the search results by the post titles?


  128. Hugo

    Hello Don, Ervald, Ryan. I am still praying for the multiple checkboxes. :) Great work so far guys !

  129. RodgerFox

    Good time.
    I am about your plugin – WordPress Custom Fields Search.
    Please tell me how to do a search as there http://www.ip4properties.com/, rather I am interested in the field:
    Select state / city and Select area
    Content for Select aria appears only when a Select state / city
    Thank you very much, with respect Valentin.

  130. RodgerFox

    The problem is that there are countries and regions in each country to country.
    User in selecting the country can also select a region.
    A good example is in the link I sent you.
    I am insanely happy that you responded to my request.
    I would be glad if you will send quote php code.

  131. Christopher Mackay

    WordPress 3.0.4 seems to have broken Custom Fields Search. Any plans for a compatibility update?

  132. Hector

    Great plugin, thanks.

    The only thing I’m missing is the capability to order the results by one or more custom field.

    Any clue on how to do it?

    Thank you all!

  133. Vladislav

    I made Russian translation for this plugin
    Great plugin, it is a pity you don´t support it any longer

  134. Carly

    Hi there,

    I’ve added this plugin and the majority of it works very well. I have 1 problem though. Say I have 2 products and both products have the keyword thiskeyword, but only 1 product has the keyword newkeyword. If i do a search for thiskeyword both products will come up. but if I do a search for thiskeyword newkeyword only the 2nd product will come up, not the other product that only has one of the keywords in it.

    Can anyone help me with this at all?


  135. Martin


    Great plugin!
    Is there a way to order the results by anything?


  136. Sabella


    Thank you very much for this super plugin, Don :) It works really good!

    I just found an issue and I would be very grateful I you could help me with this, as I´ve been trying for 2 days with no result

    The problem I found is when trying to search multiple words (categories and tags, “words in”):

    it display the results OK, but when clicking for the “next page”, the link doesn´t work because the words of my search are “reagrupated” into one:

    URL should be -example: /page/2/……/+word+word….
    and it is transformed to: : /page/2/…../wordwordword

    I found that if I change the “+word+word+word” in the url and I put “word&word&word”, It works and it displays the results for all the pages
    : /page/2/…../word&word&word/

    Could you help me, please? I don´t know where to change the code in the plugin in order to make it work,

    Thank you,

  137. Sabella

    Hello again,

    I´m still looking for a solution for that issue, with no luck!

    I would appreciate so much if someone could help me to fix this problem:

    ” The problem I found is when trying to search multiple words (categories and tags, “words in”):

    it display the results OK, but when clicking for the “next page”, the link doesn´t work because the words of my search are “reagrupated” into one:

    URL should be -example: /page/2/……/+word+word….
    and it is transformed to: : /page/2/…../wordwordword

    I found that if I change the “+word+word+word” in the url and I put “word&word&word”, It works and it displays the results for all the pages
    : /page/2/…../word&word&word/ ”

    Thank you,


  138. Sabella

    P.S. If it helps, I found that this issue happens in WordPress 3.1, not in earlier versions

  139. John

    @sabella – having the exact same issue!

    Anyone – please?

  140. Adam

    Don, Im subscribed to this feed and cant figure out how to unsubscribe- could you please remove my email? Thanks!

  141. Baga

    Same request as Adam here.

  142. Sabella

    Hello John,

    I found that the plugin works if you have disabled the permalinks
    (but I want permalinks enabled for seo reasons)

    Anyone knows how to fix it?
    ( http://www.don-benjamin.co.uk/projects/foss/wordpress-custom-fields-search-0-3-15/#comment-12667 — in wp 3.1)

    Thank you!

  143. John

    @Sabella Great – setting links back to the default in WordPress works, but like you, I want my permalinks!


  144. Zackai

    This is THE BEST search plugin that I have ever ever ever met! It helps me build a powerful search engine for my domain portfolio site. Thank you SOOOOO much.

  145. Fred

    I found that it happens in WordPress 3.0.1. and I am working with the permalinks off. When I click next page, the URL changes from

    https://(private domain)/?search-class=DB_CustomSearch_Widget-db_customsearch_widget&widget_number=preset-default&vp-0=&cs-ed-1=&cs-vp-2=John+Smith&search=Search


    https://(private domain)/?search-class=DB_CustomSearch_Widget-db_customsearch_widget&widget_number=preset-default&vp-0&cs-ed-1&cs-vp-2=John+Smith&search=Search&paged=2

    but the page does not move from page 1.

    Any ideas?


  146. Mado

    Hi Don,
    Thank you for your plugin.
    I have a little problem.
    When I do a research, the results page break my theme and usually, if I use the wp search form I don’t have this problem. If you can have a look, it’s on this page:

    Thank you very much

  147. nicoulina

    Thanks for your plugin : it’s easy and useful.
    Can you tell me if it is possible to display results with the excerpt and not full posts ? with wordpress 3.1.1, is it possible to use search.php template ?
    I’m a french blogger and my english is not so good. I hope you understand me…

  148. Rodgerfox

    Ths, for your pl. 

  149. Lyn

    Thanks for this great program. It works wonderfully.
    However, I agree with the above. Is it possible to display results with the excerpt and not full posts? This would be extremely helpful.

  150. Carlos

    how i can exclude a category?… in a dorpdown menu.


  151. pratik

    hi, how can i add categories in to “WP Custom Fields Search”.i can add state, city and all other custom field.but can’t add categary field.and i have used classipress theme. can you help me?

  152. partypoker

    It’s only once they go unsuitable that machines remind you how powerful they are. – Clive James

  153. Kopelia


    I’ve installed the plugin ‘Wp custom fields search’, fantastic plugin, but I’ve a problem. When I do a search only show one result. What can I do for show more results?



  154. Baga

    please remove my email address from the notifies. thanks

  155. Ada

    Hello, the plugin is absolutely great!

    Unfortunately, I have the same problem as Eric in number 18, which here has ever been solved. Search results will only appear on the homepage …
    Can anyone help me determine where the page template to display the search results?

    Advance thanks a lot for your help

  156. Zekai Huang

    I would really like to thank you for the awesome plugin. But I have a question for it, I have a custom filed in the format of “Date”, and I want to search post with the field that is before that Date. I found that it works on the postdata of date, but not the custom filed. I think it is just the way I used it was not right, so could you please give me a hint. Thank you.

  157. Carl O'Dell

    Is there anyway to sort by custom fields?

  158. Sandy

    Having the same issue as Sabella (135).

    it display the results OK, but when clicking for the “next page”, the link doesn´t work because the words of my search are “reagrupated” into one:

    URL should be -example: /page/2/……/+word+word….
    and it is transformed to: : /page/2/…../wordwordword

    I found that if I change the “+word+word+word” in the url and I put “word&word&word”, It works and it displays the results for all the pages
    : /page/2/…../word&word&word/

    Has anyone found a fix?

  159. Marcin

    Using it and it works great! I’m using it to build a search for concert events.
    Best regards!

  160. Arturo

    Hi there Don, thanks for this plugin, one question, do you think it is possible to have something like this: http://www.invisalign.com/Doctor-Locator/Pages/Default.aspx with your plugin? Thanks!

  161. Fabio Neves de Brito


    You have done a GREAT plugin!

    But something is not working on my website: the pagination on the search result page. Try to search at http://haandvaerksvirksomhed.dk

    Is it a bug or something else? Have you suggestuon how I can solve this problem?

    Best regards

  162. Erick S.

    Hey there,

    I like the plugin and want to use it…only thing I cannot seem to figure out is how to dispay the searchresults as excerpts with this plugin.

    I have the plugin combined with 2 other searchfields in the same form.

    If I only use one of the searchoptions that do not use the plugin all search results are presented as excerpts. Like I want.

    But when searching only with a search option that uses this plugin it shows all post(s) in total…no excerpt.

    How do I do fix this?
    Thanks for a quick answer :-)

  163. Erick S.

    Sorry for ‘bumping’…but I have found the solution for the excerpts-issue!

    The following:

    In your loop.php look for the line that says ‘/* How to display all other posts. */’.

    In this section of loop.php just remove everything that reffers to ‘the_content’.

    All I have left there is:

    Hope this has helped.

  164. Fabio Neves de Brito


    Is there anyway to insert pagination in the search result page?

    You can check out thi link http://haandvaerksvirksomhed.dk/?search-class=DB_CustomSearch_Widget-db_customsearch_widget&widget_number=preset-default&cs-all-0=&cs–1=Brol%C3%A6gning&cs-Omr%C3%A5de-2=&cs-all-3=&search=S%C3%B8g

    There you can see, the pagination is missing!

  165. Fabio Neves de Brito


    I have found the problem and have fixed it. Many thanks!

  166. KeZoo

    Hi Fabio!

    i have the same problem. Can you tell me how did you fix it?

    Best Regards,

  167. James

    Hey :)


    This plugin worked great along side the custom field search.

    My problem is the more options I enter into the search the longer it takes to even return a result (sometimes I have to reset my server).
    I have 9 options so surley it should be able to handle this :S

  168. Hudson Valley Website Designer

    Lovin’ this plugin. Working flawlessly for me :-) Thank you for this.

  169. Fabio de Brito

    Hi Kezzo

    Sorry for the late answer. I have seen now your post.

    The problem is not in the plugin itself, but in the theme.

    I have tried to use the pagenavi for example and I even couldn´t install it. Then I have activated the Twenty Eleven and the plugin worked smooth and all the plugins were activated.

    Then I have also deactivated all the plugins and activated the previous theme and the problem was back.

    I was not so sure the about the cause of the real problem. Then it was decided to build a new and primitive pagination with just “Previous” and “Next” button until I have the time to develop a better pagination.

    The solution was hard coded directly in the search.php

    Please, feel free to contact me in case you need something more else. I´d like to help!



  170. Mike


    Let me say that your plugin is one the top 5 filter plugin that I tried so far, but there is a common thing missing in all of such plugins, so if I may suggest something that would make your plugin ONE of a kind…

    Because of the dropdown selections are not dependable between them, it is possible to select such combination that returns no results….
    So what would the customer do when they try several times and get no results… they fly off… therefore, dropdowns should be dependable..

    I found a premium theme which have solved it with hiding the second field until the first is selected, then the second only show available option within the first selected field in the dropdown…
    my gues would be that the loop is done after every selection… but not really a pro php so not sure if that is possible…

    Hope that somebody can help me out to achieve this…


  171. maik


  172. Dean


    Ive been on the hunt for a multiple cat search feature and have found my solution which is great!

    I have one major problem with your form.

    Ive done all the testing and the whole system works fine searching.

    Its just when I click search the results are shown on the homepage which features a image slider which makes the page all funny. I would like the search results to show on a normal page without the main slider on.

    Click Search = Results on index.php *NOT GOOD*


    Click Search = Results on search.php *GOOD*

    This would make search results look a whole lot better and the complete installation of this plugin.

    Any ideas would be great and any info needed then I will supply.


    PS: Im willing to donate some £ if able to complete.

  173. Buy clothes online

    hey there

    good plugin, but with lot of room for improvement to be even better. if someone work on this, let us know, as we would like to grab some improvements and use this type of custom search. thanks

    of course if you are after some fancy branded fashion visit us at

    improvements we would like with plugin: exclude/inc categories filed, and/or option for user, and similar.

    tip for anyone else: don’t use plugin search page, use plugin code and make your own from your theme template. works perfectly. very easy to customize form with css. also works with 3.4 :)

  174. Profango

    I’ve been tryin to get the plugin to work correctly because when it does it will be exactly what I need. But unfortunately the plugin is not allowing me to search categories.

    In the area that ask me to list the drop-down items I have specific categories with the exactly names so that the categories are searchable… but when I go to search for them they arent found.

    What I have done was disable a text field for keyword searches because I want all of the plugins to come up as in the category search without keywords

    Can you help me with my issue.

  175. kenji

    Hello, great plug-in. I appreciate auther of this.

    Today i try use checkboxes,but code is Ryan’s full code is 404.

    if Somebody have Fixed Code :http://www.ryanmalin.co.uk/checkboxes.txt
    ,Please upload it again.

    or mail to me.

    If you do, I am very appreciate.

  176. kenji

    Sorry repost,
    my mail address is fline999@yahoo.co.jp

  177. Alberto

    any advance about check boxes??? I really need to integrate check boxes in my advanced search form… : (

    I´ll paid for it.


  178. Ryan

    Hi guys.

    I have reposted my code for checkboxes at the below URL:


    I didn’t realise people were looking for it, sorry about that. I don’t think this plugin is supported by Don anymore :-(


  179. Stan

    How I can return only values of custom fields? See problem in this site – in dropdowns returned values from MySQL base. Checkboxes are generally wrong… -(
    How I can fix it?
    P.S. WP 3.5.1, WordPress Custom Fields Search 0.3.15

  180. Jon

    I’m having problems with multiple search forms on the one page. I have a tabbed widget area and a different search form in each tab. The counter gets confused and flashes through a bunch of possible numbers of posts to return, then it gives up and sets to 0 and stops one from pressing on the search button.

    It only really happens with the first form (the main one) and the rest of them in the tabbed areas [seem] to work fine.

    So I either need to know how to just turn off the function of the counter results thingy or have the issue fixed.


  181. virtual hairstyles yourself

    I am really enjkoying the theme/design of your web site.
    Do you ever run into anny internet broiwser compatiility problems?
    A few of my blog reaaders hsve complained about my blog not operating correctly
    in Explorer but looks great in Firefox. Do you hafe any tips to help fix this issue?

    Here is my homepage … virtual hairstyles yourself

  182. accutane

    Hi, i think that i saw you visited my web site so i came to “return the favor”.I’m attempting to find things to enhance
    my web site!I suppose its ok to use a few of your ideas!!

    Here is my webpage … accutane

  183. e cigarette brand

    Usually I do not learn post on blogs, but I wish to
    say that this write-up very compelled me to check
    out and do so! Your writing taste has been surprised me.

    Thanks, very great post.

  184. portroyalrattandaybeds.wikispaces.com

    Great web site, really been exploring forever for tips on the very best rattan furniture for our home and in our garden.
    This website seriously helpedgreat blog some great info here

    Feel free to surf to my blog post … port royal platinum dining set (portroyalrattandaybeds.wikispaces.com)

  185. Onita

    Terrific steam showers, we had a unit hooked up approximately 5 years ago but it
    may possibly do with modernizing, never get a boring old typical
    type of shower again

    My webpage :: steam shower uk (Onita)

  186. casino online

    Excellent website. Plenty of helpful info here.

    I’m sending it to some buddies ans additionally sharing in delicious.
    And naturally, thanks to your effort!

  187. Pearline

    Fantastic page, really been searching forever for tips on the best
    rattan furnishings for our home and in our patio. The website seriously helpedgreat blog some
    great info here

    my website … port royal prestige corner sofa (Pearline)

  188. simpsons tap out cheats

    Download The Simpsons Tapped Out Cheat.
    The Simpsons Tapped Out Cheat is the best generator for Donut and Coins.
    Now you don`t have worry about your account thanks to special anti-ban system.
    Download now and have a fun.

    Feel free to visit my site – simpsons tap out cheats

  189. tothai

    Hi Don,

    Perfect plugin, you r awesome.

    But i get a eror: My result when use your Plugin seach only display Title, not display meta: example: date, post content..

    Can i fix it, please?

  190. Lagu Ambon Terbaru

    thank you…

  191. Robin

    Hi can you help me with my problem. My custom field search plugin have problem with the numbers search. 10, 20, 30, 40 works good but i have 3 numbers 100, 200, 300, 400 than my search will not working have any body on solution for this. I am weeks bizzy whit this?

  192. Outlawteddy

    Hi Chris.We’re shooting for Tuesday.But we can’t do the same deal that way.Here’s what I can do If you can pay with Visa/MC, I can make aotnher link for you and you can pay that day. The current WSO is up at around $10.It’s work, but if that helps, let me know.-Mark

Leave a Reply

ERROR: si-captcha.php plugin says GD image support not detected in PHP!

Contact your web host and ask them why GD image support is not enabled for PHP.

ERROR: si-captcha.php plugin says imagepng function not detected in PHP!

Contact your web host and ask them why imagepng function is not enabled for PHP.

Back to top