Custom Field GUI for WP 2.1: The Comments

This post currently has 73 comments. Add yours.

  1. Thank you very much! This fix for 2.1 works well so far.

    Comment by Basilisk — January 29, 2007 11:06

  2. It doesn’t appear to work at all with 2.1. I’ve activated it, made sure everything is in the plugins folder in wp-content. I tried turning off all other plugins to see if there was a conflict there, but nothing I can do changes it. The custum fields used to show up beneath the main post textarea. Now they don’t show up anywhere.

    Comment by John — February 2, 2007 10:56

  3. Further investigation releveals that it doesn’t work in Firefox or Safari. Not sure about IE yet.

    Comment by John — February 2, 2007 11:12

  4. But: version 1.1 seems to work properly with no problems.

    Comment by John — February 2, 2007 11:14

  5. John,

    Do you still not see the custom fields? Make sure you still have conf.ini (not conf-sample.ini).

    Version 1.1 had a problem when someone left a comment. (See WP Support Forum http://wordpress.org/support/topic/102423 )

    Comment by Joshua — February 2, 2007 19:27

  6. Doesn’t work either on IE 7.

    Comment by T1ps — February 3, 2007 00:51

  7. Hey thanks for the fix, nice work!

    I’m trying to work out how to restrict this plugin so that it only activates if I’m editing posts from a particular category… any tips on this much appreciated (maybe you could email me)

    Many many thanks :)

    Comment by 3stripe — February 3, 2007 07:13

  8. Thanks for this handy plugin.
    But I think you should add textarea cols and rows option so that the textarea will be more accessible.

    Comment by Starr — February 4, 2007 00:31

  9. Whenever I have a single quote, it gets escaped when I save the meta data. I have added stripslashes() to the template file to get rid of them, but if the post is edited and saved again, more backslashes are added. Any suggestions on getting rid of these backslashes? Thanks.

    Comment by Blake — February 13, 2007 08:02

  10. I would like to add my support to 3stripe’s request if that is alright. Showing custom fields by category seems like a really good way of extending this fantastic plugin. I can’t believe its not better publicised and added to ‘top 10′ lists… I’ve been looking for something like this for ages to utilise customfields. Thank you!

    Comment by Flick — February 18, 2007 12:47

  11. Same problem as Blake here.. any ideas?
    I agree with Flick: this is a top10 plugin.. Custom fields by category? * B U M P * sounds very good..
    Thanks Joshua

    Comment by LiZharD — February 19, 2007 09:20

  12. Hey, I’d also like to suggest support for multi-select lists and multi-checkbox lists. Not sure what that’d take, but those seem to be pretty big features of HTML lists and checkboxes that would be nice to have here.

    Comment by Phil — February 21, 2007 15:40

  13. Blake and LiZharD, try this beta
    http://rhymedcode.net/?dl=rc-custom-field-gui-1.5b.zip

    Comment by Joshua — February 24, 2007 00:11

  14. Hi, Josh, and thank you for a great plugin. It has literally saved my possibility to add custom fields to post because the original wp gui for that was not working… Anyway I have a request for an essential functionality that I noticed your plugin lacks: I have been able to add GUIs to the “write post” page, but not to the “write PAGE” page. I’m using “page links to” plugin, so I also need custom fields added in pages but without your plugin I cannot do it… Anyway feel free to visit my page http://www.secretia.com anytime! Thanks again!

    Comment by Diego — March 1, 2007 09:49

  15. Hi Joshua,

    Thank you so much for the great plugin! I am wondering whether there is a way to change the config.ini file, so that the custom field can take values from a database (currently we have to manually input values for each custom field). For example, the custom field name is BookTitle, and I would like to create a drop down with populated values from a database. Any suggestions would be greatly appreciated.

    Comment by Xuejin — March 2, 2007 13:01

  16. Hi Joshua,

    I rewrote part of the rc-custom-field-gui.class.php, now the custom field could be a dropdown with data coming out of the database.

    There is another thing I’ve noticed. It seems in the config.ini file, the value field could not be multi-line. This is odd since the manual of parse_ini_file says that “As of PHP 5.0.0 this function also handles new lines in values”. (This is also the reason I decided pulling the data directly out of the database for the dropdown list)

    Comment by Xuejin — March 5, 2007 10:56

  17. dang it, this is exactly what I need EXCEPT it’s useless to me without multiple-select checkboxes :( Good work I’m sure, but sadly I cannot use it.

    Comment by ygg — March 7, 2007 11:52

  18. Hey,

    gotta problem on my blog with your great plugin. Under the input mask for a new entry I see the custom fields, but after being published the fields respectivly the content of them dont show up… I think its like this after I installed WP 2.1.2
    Is this a known bug? What can I do to get the fields back ;). And yes, I do use the conf.ini without the “sample”.

    Comment by Tobi — March 16, 2007 04:43

  19. Hey,

    just forgot to put the meta in the loop after the update. My mistake ;)

    Comment by Tobi — March 16, 2007 05:17

  20. if it would have special fields when editing a category (what is a great idea), it would be great, if i would have an option to Write post with that preselected category (and so the right custom fields) – such functionality would just add new items to Write, so you could make Book review category asociate it with custom fields, and in the Write menu would be Write new Book review. It should also work with posts and you should be also able to hide for that category the block you do not need. And then also add special role for each category, so only allowed people will be able to make a post in the category. And also special “manage” menu, so you could do Manage Book review and you will see the list on posts with Book review category, with defined columns (e.g. that defined custom fields) …

    ;)

    I know i want a lot of things, but if this would exist, it would made this plugin the #1 for my wordpress instalation (#2 after akismet at some instalations) ;)

    Comment by Tomas Kapler — March 16, 2007 09:07

  21. Hi,

    I wonder il there’s a way for adding a file type input ?

    thanks

    r1cc0

    Comment by r1cc0 — March 21, 2007 05:46

  22. Looks great. But before I wreck by WP database: I ALREADY have custom fields with precise names for most of my posts. Must I avoid using the same custom field names for my subsequent posts? or will they share with fields in your interface? finally is there any way of importing existing custom field data into your framework?
    Thanks and sorry for simple-minded questions
    Martin

    Comment by Martin — March 26, 2007 06:57

  23. Message to Xuejin who wrote in these comments on March 5, 2007:

    I rewrote part of the rc-custom-field-gui.class.php, now the custom field could be a dropdown with data coming out of the database.

    Your modification/improvement would help me greatly with my preceeding query!
    Perhaps Joshua can put in touch?
    Martin

    Comment by Martin — March 26, 2007 07:19

  24. Martin,

    If you have existing custom field keys, you would add those keys to the config file. Next time you edit your post, your custom field value should appear in the interface of Custom Field GUI. This plugin just provides the interface–it pulls and saves data to the same place as if you used the native interface.

    There is no automated way to import existing custom field keys to the config file. Remember, you just need to add the custom field KEYS; you’re not importing post-per-post.

    By the way, you should grab the beta version linked somewhere above if you haven’t already. No one’s complaint about it yet.

    Comment by Joshua — March 26, 2007 20:01

  25. Xuejin : a custom dropdown field allowing to make a choice from db data is exactly what I’m currently looking for for a CMS hack of WP.

    Got an email ?

    or Martin : are you planning to add the feature in a coming release ?

    Comment by Malaiac — March 28, 2007 06:13

  26. Awesome plugin! It’s going to enable me to setup some default post meta without involving the writer more than they need. One request though, could you please give textarea an optional default value?

    Many thanks!

    Comment by Chris — March 29, 2007 16:12

  27. Hi.
    This is a great plugin! Thank you!!!

    But, I wont put discriptions about each value.

    For Example:
    It’s bbb

    Can I do this?

    Comment by Qz — April 6, 2007 08:24

  28. Hi,
    although Custom Write Pages are being developed, I added a simple feature to Custom Field GUI: ‘select multiple’.

    Where can I send the updated file?

    Comment by Martins — April 11, 2007 08:50

  29. Multiple select lists! OMG… I’m in desperate need for that… So how does one go about tracking down Martins ^_^ and getting the code changes?

    Comment by Scott — April 12, 2007 17:28

  30. I was wondering if there is a simple way to allow html (namely email addresses) in the conf.ini for a select list? I have a case where I would like to create a name and email link pair for a real estate office.

    I am sure that I could hack the rc-custom-field-gui.class.php to not choke on the HTML or create a new loop to do a find and append to the array that the rc-custom-field-gui.class.php builds the select from.

    I would really like to be able to do this without getting into the rc-custom-field-gui.class.php file.

    Any help would be appreciated. Great Plugin BTW!

    Jay

    Comment by Jay Gilmore — April 24, 2007 13:34

  31. Is there a way to uncheck a checkbox that has been checked?

    Comment by max — May 2, 2007 04:10

  32. How are you getting the values of the fields to display in the post? For example if I select miles walked, how will this display on the live site/post? Do I not have to make edits to my wordpress them to display the_meta ?

    Comment by Matt — May 2, 2007 14:20

  33. Matt,

    Yup, just call the_meta and whatever value you input will show.

    Comment by Joshua — May 2, 2007 20:01

  34. max,

    You meant radiobutton? Because I don’t have problem unchecking checkbox.

    Just delete the custom field via WP’s custom field interface and refresh the page.

    Comment by Joshua — May 2, 2007 20:40

  35. thanks joshua! the trick is to refreh the page after deleting the custom field entry vie WP’s custom field interface, and then saving the page. i simply deleted and then saved. in that case the field prevails…
    hope your custom write panel comes along well, really looking forward to that. it’s gonna make things a lot easier!!!

    Comment by max — May 3, 2007 06:39

  36. hm, but if i use clutter free to hide the wp custom fields i wouldnt be able to uncheck an option, once it is checked. should be given thought also for the custom write panel plug in i think. people are quick with chosing an wrong option, as they are sure,that it can simply be undone with another click in the same field.

    Comment by max — May 4, 2007 08:28

  37. Hi,

    I;ve using custom fields and it works but the output is sorted in alfabetical order. I don’t want that.

    For example. my custom fields:
    Type
    Weight
    Lenght
    Height
    Width

    I want this order, but when i view my post it displays:
    Height
    Lenght
    Type
    Weight
    Width

    Anyone knows how to solve this?

    Comment by ArjanV — May 10, 2007 06:28

  38. After using custom fields GUI, I thought it would be nice to be able to search within custom fields. Found the plug-in http://guff.szub.net/2006/04/21/search-custom-fields/ but it had no Interface and it cannot search within multiple custom fields.. so, I supplemented the code by adding the features and here is the result: http://kamvajag.lv/programming/custom-search/

    Comment by Martins — May 17, 2007 05:17

  39. very quite here!?

    Comment by ArjanV — May 19, 2007 11:17

  40. Hi –

    Can this be made to work on Pages as well as Posts? I want to make pages with a custom template that use this plugin’s custom fields.

    I’ll do some experimenting, but I would love it if you would drop me an email. Thanks! :)

    Comment by Stephen Rider — June 13, 2007 12:04

  41. Answered my own question! :)

    To make this work on Pages as well, just add this to rc-custom-field-gui.php:

    add_action( ‘edit_page_form’, array( ‘rc_custom_field_gui’, ‘insert_gui’ ) );

    Comment by Stephen Rider — June 13, 2007 12:19

  42. it doesnt seem to work on 2.2? Im trying using WP 2.2 clean install… how can i debug what-s wrong with it? It’s not displaying the fields on the write post page.

    Comment by tricky — June 16, 2007 16:41

  43. You renamed the sample config file to conf.ini, right?

    Comment by Joshua — June 17, 2007 05:03

  44. OMG my bad. i shall be punished for not noticing. everything i ok in 2.2

    Comment by tricky — June 17, 2007 23:00

  45. Fantastic plugin. Works great. Just a side question:

    Do you have any plans to do something similar with the comments page? I’d love the ability to create custom fields for visitors when they comment on an article.

    Comment by Mike — July 29, 2007 05:46

  46. That would be awesome if you could have this implemented with the comments page.

    Comment by Yan — August 2, 2007 12:53

  47. Hello, I need some more functions so I ask.

    1. I need to make that a custom field is a one small icon.
    2. The second thing which I need is filtering posts by the custom field. For example – custom field is an author (not the author of the post, but the author of design etc.). So when I click on this author it will show me all posts which have in this custom field the name of this author. This same function I need with the icons ^^
    3. Custom field is link

    Any tips how to make it ?

    Thank you

    Comment by Martius — August 8, 2007 03:29

  48. Hi,

    Great plugin, thanks! Most of the posts on our website would need the functionality of this plugin, however, some posts e.g. “Events”, wouldn’t need to pull in the custom fields so is there a way to hide/delete/not use these fields so that even when left blank on the form, they don’t appear in the post? Or am I missing something (I’m not a PHP programmer so depend on plugins to help me out with WordPress!) Thanks for your help!

    Comment by Aoife Ni Chionnaith — August 14, 2007 15:44

  49. Is there a simple way to make the items order other than alphabetical?

    Comment by NetBloke — August 23, 2007 14:39

  50. I tried adding add_action( ‘edit_page_form’, array( ‘rc_custom_field_gui’, ‘insert_gui’ ) );, but still don’t get the option for the GUI when posting a PAGE.

    It works fine (awesomely, actually) when writing a POST, but not a PAGE.

    Any suggestions?

    Comment by Mike — September 10, 2007 13:42

  51. Mike: I just had the same problem than you. Check the quote marks, and make sure they’re the same as on the other lines of the code. It’s these –> ‘

    The line you pasted on your comment has different ones.

    Comment by Nico — September 12, 2007 11:37

  52. Oops, looks like the comments here convert the quote marks. Just make sure they’re the same as the rest of the code. It worked for me.

    Comment by Nico — September 12, 2007 11:39

  53. Nico, you’re my hero.
    Thanks. All is working now.

    Comment by Mike — September 21, 2007 19:58

  54. Thanks for this plugin. I have adapted it fairly heavily for my use, but have utilised it in another plugin which I hope to release shortly.

    So thank you for making it available, it saved me a lot of time and effort!

    Comment by Rich Pedley — September 28, 2007 13:46

  55. Thank you very much for this plugin! Really great!

    Maybe it could be useful to add an explanation to the readme how to get the values of the new fields in the post.

    I got it now and do it this way:

    ID, $key, true); ?>

    Thanks again,
    Rita

    Comment by Rita — October 9, 2007 00:32

  56. Sorry, Code not complete:

    ID, $key, true); ?>

    Comment by Rita — October 9, 2007 00:33

  57. I am having a bit of a problem. I am using this plugin and the get custom fields plugin at the same time and its kinda not interacting well. I use a custom field to input a url that displays as an image in my post, however if i use the_meta() it prints the custom field and the URL. Is there a way (as suggested above) to only pick the fields I want to display? I don’t quite understand how the above poster did what they did.

    Comment by Rob — October 23, 2007 21:20

  58. nm, I got it to work the way I need it to using the get custom field plugin. So far this plugin looks to be invaluable. Just one problem, I have 2 check boxes defined in the conf.ini file and when I grab their custom fields with get custom field plugin it only pulls one of the checkbox fields the other one says “true” any ideas?

    Comment by Rob — October 23, 2007 21:45

  59. thanks for the plugin!!

    I was wondering: is it possible to have a dropdown selection box that lists files in a directory?

    I’m trying to add a custom field to select an image out of the images that user has already uploaded.

    Thanks!

    Comment by eliot — November 11, 2007 20:59

  60. Doesn’t Work for 2.3.1 :)

    Comment by phpbbx — November 15, 2007 13:43

  61. [...] Additional custom fields for posts, with text entries in the post page (made easier by the custom fields GUI plugin). [...]

    Pingback by Roo Reynolds - What’s Next? » Blog Archive » Speechification — November 16, 2007 09:47

  62. Thank you for your great plug-in.
    I have a problem.
    I use some same named field keys on single post.
    ex.)

    key=lib value=LibA
    key=lib value=LibB
    key=lib value=LibC
    key=date value=11/20/2007
    key=publisher value=PubX

    Then, activated this plug-in using following conf.ini
    [lib]type = textfield, size = 20
    [date]type = textfield, size = 20
    [publisher]type = textfield, size = 20

    When editing above post, this plug-in’s GUI showed just one “lib” key and “LibA” value.
    After updated the post,”lib”-”LibB” and “lib”-”LibC” was gone.

    Could I use same named keys? Is it a matter of conf.ini description?

    Comment by yhiroaki — November 22, 2007 21:12

  63. Thank you for the great plugin. Works pretty good on wp 2.2.3

    I have a question:

    Is there any chance to have the new field with a red background or the types in red?

    Thanks,
    Rita

    Comment by Rita — November 29, 2007 03:12

  64. Thanks for the plugin!

    Just to let you know, there is a bug in the output for checkboxes. It works fine in Firefox, but unfortunately IE doesn’t like “checked=”checked”". It’s not valid HTML either, so here’s the fix.

    Line58:
    ”;

    It should be as follows:
    ”;

    Basically, remove the double quotes before and after the $checked variable. Merry Christmas from Tokyo!

    Comment by chriskk — December 25, 2007 20:51

  65. Hi,
    Custom-field-gui serves me well. Very useful. Thanks.

    Is there any way I can adapt it so that, when a post is created, all the custom fields will automatically be ‘populated’ with some nominal data (later to be changed manually)?
    I would be grateful if you could make suggestions!
    Thanks

    PS: any forthcoming developments, upgrades?

    Comment by Martin — January 24, 2008 22:21

  66. Ok one thing I’d like to add to this fantastic plug-in. How do I get it to display the WYSIWIG toolbar (say TinyMCE) on a textarea so that it becomes very much like the main posting area?

    A

    Comment by Andy — February 1, 2008 07:06

  67. Hi there,

    I made a very small modification (added 2 lines of code) to get this plugin to look much nicier in wordpress 2.5

    It nows looks exactly like the other boxes in the post page, wich you can expand or hide… Its beautiful.

    Please let me know if you want it. By the way, its a good ideia to publish this plugin in the wordpress.org/extend/plugins directory

    cheers and thanks

    Leo,,

    Comment by Leo Germani — June 12, 2008 09:26

  68. Leo, I was wondering if you knew how to make this work on 2.5? I’m having issues getting anything to show on the write page, none of my custom fields are showing.

    Hope you can help.

    KJ

    Comment by KJ — June 16, 2008 08:52

  69. Ditto – I don’t seem to see any of the info showing up on the post page. When I create the post, I see the option for custom fields, but nothing shows up when I publish. Any ideas? I’m highly interested in this plugin. If there is a way to make this work, I would appreciate a quick email with instructions. Thanks!

    Comment by Ron — June 19, 2008 16:44

  70. P.S. I’m on WP v2.5.1

    Comment by Ron — June 19, 2008 16:45

  71. sorry I don’t know how to make code show up here

    Comment by Eric — September 11, 2008 04:25

  72. nope

    Comment by Eric — September 11, 2008 04:27

  73. I’m still using this plugin but was wondering if it could be updated to fit in WP 2.7? It’s still functioning as it should, just not in a handy place at the bottom of the ‘write new post’ screen. If it would fit in the new page layout of 2.7 I could move it up next.

    Thanks!

    Comment by jack — December 11, 2008 06:32

RSS feed for comments on this post. TrackBack URI

Leave a comment