Notifications
Clear all

Custom fields improvements

5 Posts
3 Users
1 Reactions
3,056 Views
(@stevygee)
New Member
Joined: 8 years ago
Posts: 4
Topic starter  

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)
New Member
Joined: 8 years ago
Posts: 4
Topic starter  

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 reacted
ReplyQuote
(@binny)
New Member
Joined: 5 years ago
Posts: 2
 

@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)
Support
Joined: 5 years ago
Posts: 1403
 

@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)
New Member
Joined: 5 years ago
Posts: 2
 

@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:
Scroll to top