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: , , , 47 comments »

47 Responses to “WordPress Custom Fields Search 0.3.13”

  1. 2046

    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

  2. Pete

    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!

  3. Adam

    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

  4. cna

    Hi Don,
    I wonder if there is a way to highlight search hits and display only hit context (concordance) instead of whole posts.

  5. Samiha

    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

  6. michael

    Hi Don,

    Have you heard about ClassiPress theme?

    Can you give me an idea how to integrate your plugin into ClassiPress?

  7. Raphael

    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

  8. Monika

    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

  9. Don

    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

  10. Ekaterina

    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?

  11. Ekaterina

    Oh, and one more question! How to display subcategories list (which belong to one category) in drop-down menu??

  12. lex

    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…)

  13. Nicky McCatty

    Hi Don,

    Do you have any examples of sites that use your plugin?

    Thanks,
    Nicky

  14. Len

    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

  15. Monika

    ok I try it on an absolute new installation -only flutter and your plugin

    thanks

  16. Yash

    Am I really thick or is there no way to implement a category not equal to condition?

  17. Michael

    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.

  18. Len

    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.

  19. Don

    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.

  20. Don

    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

  21. Don

    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.

  22. Yash

    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.

  23. Jonathan Casuncad

    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

  24. Don

    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.

  25. Len

    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.. ?

  26. Andres

    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!

  27. Mat

    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!

  28. icecubejackal

    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.

  29. Donna Vitan

    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.

  30. karo

    hi, i used the widget but i have nog widget background?
    can someone help me?

  31. Norma

    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

  32. Norma

    Pardon, replaces it to Any in line 374 extra-search, that this solved, itself fighting with the listings, thanks

  33. Marek

    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

  34. mikey

    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

  35. Alyssa Brock

    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

  36. Carl O'Dell

    Is there any way to sort by custom fields?

  37. SpanishMaterials

    Could anyone help me with the code to show search suggestions while user typing? Thanks.

  38. Ajinkya

    Hi,

    anyone help me to show default checked radio option. how to implement.

    Thanks

    Ajinkya…. 🙂

  39. Veljko

    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

  40. zero

    WordPress Custom Search Plugin

  41. alin

    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.

  42. don

    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

  43. burberry scarf cheap

    cause, were legitimate protesters. It is the
    burberry scarf cheap http://www.lifeartpeace.com/cheap-burberry-scarf

  44. Toney

    I am imƿressed with this site, real I am a fan.

  45. life in miami florida

    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.

  46. woocommerceplugin

    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.

  47. Toni

    it is look like the custom search have improve a bit, hope it will better and better


Leave a Reply



*

Back to top