I’m currently working with custom comment meta, and I have some custom additional field such as rating etc, when user write a comment ( not comment reply ) I want to show the rating field, but when it’s on reply comment state I want to remove this field.
Is there a build in conditional function to check whether it’s in a reply state or not? or any other way to achieve what I want?
Check for the
comment_parent
:I realize this question is quite old, but I just solved this problem today with a JQuery-based approach.
Basically I have click handlers for when the “Reply” or “Cancel” links are clicked, and I handle form validation with Javascript (using Parsley, in this case).
For server-side validation you can use diggy’s solution.