Custom fields improvements  

  RSS

stevygee
(@stevygee)
New Member
Joined: 2 years  ago
Posts: 4
19/12/2016 2:33 pm  

Hello,

I'm a theme developer and I started using wpDiscuz for a client project. We needed custom fields for comments and I'm heavily modifying the comments walker to display the custom field values where I want them in the template.

Unfortunately it took a bit of work to be able to get a specific custom field value. I had to make an additional query for comment forms, find the currently used form and loop through the fields to find the field I want.

Based on this experience I would like to suggest:

  • Add the ability to set the meta name for a custom field in the form editor

or

  • Give access to the active form and field names within the comments walker (currently these are set to private)

Otherwise, I'm quite happy with your plugin and I'm considering getting some of the addons. Keep up the good work!


ReplyQuote
stevygee
(@stevygee)
New Member
Joined: 2 years  ago
Posts: 4
21/06/2018 2:15 pm  

For anyone stumbling upon this thread, the ability to set the meta name for custom fields has since been added to wpDiscuz! In the form editor, when editing a custom field, this option is hidden under Advanced Options.

So it is now much easier to display the field values wherever you want in a custom template/walker, like this:

get_comment_meta( $comment->comment_ID, 'custom_field_meta_name', true );

Thanks!


Astghik liked
ReplyQuote
Share: