Notifications
Clear all

Custom fields improvements  

  RSS

stevygee
(@stevygee)
New Member
Joined: 3 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!


Quote
stevygee
(@stevygee)
New Member
Joined: 3 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
binny
(@binny)
New Member
Joined: 2 months ago
Posts: 2
31/03/2020 2:52 pm  

@stevygee

Hey and thanks for that' do you have any suggestions on how to send costume fields value to the comment moderator?


ReplyQuote
Elvina
(@elvina)
Prominent Member Moderator
Joined: 9 months ago
Posts: 966
01/04/2020 12:48 pm  

@binny,

I'm sorry, but we don't follow you well, please try to explain in other words, or by using some screenshots.

 


ReplyQuote
binny
(@binny)
New Member
Joined: 2 months ago
Posts: 2
01/04/2020 1:15 pm  

@elvina

Hey Elvina,

What I mean is that in my case I have a costume phone number field that I need in case the comment Author wants to be contacted by phone.

I need to send that value to the post author so he can reach back.

I am struggling with getting the value to inject into the email sent by wp automatically after a new comment.


ReplyQuote
Share: