0

I'm trying to display comment meta under each comment, but I couldn't find which action should I hook in.

1

You will need get_comment_meta to pull that information from the database. You will need to know the metakey. If you don't have that, you will have to search the theme/plugin that generates the metadata for the occurence of add_comment_meta to find it.

Where to hook depends on how your theme is listing the comments. If it simply uses wp_list_comments there is no filter to simply attach the metadata. You will need to change the callback argument using the wp_list_comments_args filter. Then you can make a callback function that specifies which comment and meta data to display and how (learn more).

  • thanks for both editing and comments. I'm trying to figure that out. – Kimsea Sok Aug 22 '18 at 2:39

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.