WordPress.org

Ready to get started?Download WordPress

Forums

Search Custom Field Data? (17 posts)

  1. mikejandreau
    Member
    Posted 5 years ago #

    Anyone know of a plugin, or a good way, to search custom field data in WP Admin?

    I've got DVD Release Dates in one of my fields, and when it's not announced yet, we enter "Not yet available". When it gets announced, we go back and update them.

    I haven't found a good way to search through custom data, aside from doing direct database queries, which not everyone who does these updates is capable of doing.

    Any suggestions?

    Note: I don't need these custom fields to be searchable on the website itself, just in WP Admin.

  2. jonradio
    Member
    Posted 5 years ago #

    You didn't say whether these Custom Fields are on one page or post. Or on many.

    If they are all on one page or post, you can use the Search capability on most current web browsers, when positioned on the page or post in question on WP Admin's Edit Page.

    I just tested this on IE8, and it works very well.

    Otherwise, I'd be looking at some sort of OpenSource MySQL database query user interface that includes security so only Admins can sign on.

    I use DaDaBIK to update the separate MySQL database that I access from WordPress, and I see that it has a Search facility, though I've never used it. Set up properly, I know that DaDaBIK can access the WordPress MySQL database. dadabik.org

  3. mikejandreau
    Member
    Posted 5 years ago #

    Each post has its own custom field for this data.

    If I search in wp-admin in the "Edit Posts" field, it doesn't find these posts based on it, which leads me to believe that search only looks at post_content, and not metadata.

  4. jonradio
    Member
    Posted 5 years ago #

    I haven't tried it, but a quick search for plug-ins turned up one that seems to address your needs: http://wordpress.org/extend/plugins/wp-custom-fields-search/ There may well be others, so a more thorough search might be worth your effort.

    Admittedly, this lets everyone, not just Admins, search Custom Fields, and not from wp-admin panels. But it is probably a more integrated solution than DaDaBIK.

  5. mikejandreau
    Member
    Posted 5 years ago #

    I tried that one, it's not what I'm after.

    I don't want people on the site itself searching for these fields. I just want to be able to identify posts from the Admin panel to find data that needs updating.

    It doesn't seem like this should that hard of a task to accomplish, but it's turning out that it is.

  6. WPJunky
    Member
    Posted 5 years ago #

    Been looking for this capability whether in the admin section or just a function I can add to a template.

  7. Rich Owings
    Member
    Posted 4 years ago #

    Yes, I'm looking for the ability to do this from admin too.

  8. Mark / t31os
    Moderator
    Posted 4 years ago #

    So what is it you want to be able to do? ...have the search text check against meta data aswell as the title/content?

  9. Mark / t31os
    Moderator
    Posted 4 years ago #

    I was feeling adventurous, so i wrote a simple plugin to do it..
    http://wordpress.pastebin.ca/1736605

    The post search in the admin will now also check against the meta keys and meta values when checking for matching posts... ;)

  10. Rich Owings
    Member
    Posted 4 years ago #

    You are awesome! Works perfectly.

  11. Mark / t31os
    Moderator
    Posted 4 years ago #

    Happy to help.. :)

  12. kazes
    Member
    Posted 4 years ago #

    Hi,

    I've been searching (almost) everywhere to find how to hack the sidebar search field to search my custom field and your solution seems to be good but would it be possible to apply it to the theme ?

    I resume : Can i use the search field in my sidebar to search wysiwyg content AND custom fields too ?

    Thanks for your help :)

    my website is http://www.micromix.fr
    it is a theme I made, and if you look in the PLAYLIST you have each 'artist - title' as a custom field value. And I'd like to search an artist and it returns the post(s).

    PS: Sorry for my english :p

  13. Jeff Byrnes
    Member
    Posted 4 years ago #

    t31os_, giving your plugin a spin, but unfortunately it's triggering a fatal error (the error is not being specified, sadly) on activation. I've tried disabling all of my plugins, and it still does it, so it's not a conflict. I'm using WordPress v2.9.1.

    Any ideas? I'd love to get this going on my install.

  14. netlog
    Member
    Posted 4 years ago #

    I use DaDaBIK to update the separate MySQL database that I access from WordPress, and I see that it has a Search facility, though I've never used it. Set up properly, I know that DaDaBIK can access the WordPress MySQL database.

  15. Ian
    Member
    Posted 4 years ago #

    awesome - I was looking for the same thing and pasting the plugin above (by t31os_) into my theme functions (after one soul shaking false start, haha) worked perfectly for me.

    The "search everything" plugin previously recommended didn't help at all, actually made it worse.

  16. Ian
    Member
    Posted 4 years ago #

    hmm, well I thought it was working and then it sort of... stopped. I'm not really sure what's going on with this? sometimes it seems to find all the results I want, and then sometimes it just doesn't find anything!

  17. banderas
    Member
    Posted 4 years ago #

    t31os_: Could you please paste the plugin on another pastebin? The pastebin.ca location seems to be down.

    I have been looking for this feature everywhere!

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic