0

I want to allow commenting on a custom post type by a specific user role. And a user can see only his comments only.

Scenario is

e.g User roles are student and instructor. The Student can comment on a lesson, which is a custom post type. An instructor can see his comment and then reply on it. Same the same student John can see only his comments and replies on his comments by his instructor.

I used the link for reference also using the comment_form for reference.

0

Please check this

$args = array('post_author' => get_current_user_id(),);
$comments = get_comments( $args );
$list_args = array(
   'reverse_top_level' => false 
);
wp_list_comments( $list_args, $comments );
  • 1
    Please edit your answer, and add an explanation: why could that solve the problem? – fuxia Jan 21 '17 at 13:30

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.