0

I added some custom fields in comment, so i have a couple of more fields.
from that form I can comment but am unable to display that comment. The comments are set to moderation so admin have to approve the comments. The value of the new fields are saved on database.
what I've done so far, displayed the comment form via comment_form()
But wp_list_comments( array( 'style' => 'ol' ) ); is not retriving any comments.
Discussion page looks like this enter image description here

Also the comments in backend looks like this enter image description here Well I think in general wp_list_comments( array( 'style' => 'ol' ) ); should get the comments. But it is not displaying anything.
Any help is appreciated.

0

I am not sure where you are using the function wp_list_comments but you should use it in the theme comments.php template file and call it using comments_template function.

If you want to display comments anywhere else then you can use function get_comments

  • That worked thanks.. like you said i used comments_template like this if ( comments_open() || get_comments_number() ) : comments_template(); – Regolith Apr 20 '17 at 11:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.