我想允许特定用户角色对自定义帖子类型发表评论。用户只能看到自己的评论。
场景是
e、 g用户角色是学生和讲师。学生可以对课程发表评论,这是一种自定义的帖子类型。讲师可以看到他的评论,然后回复。同一个学生约翰只能看到他的评论和老师对他的评论的回复。
我用了link 也可使用comment_form 供参考。
我想允许特定用户角色对自定义帖子类型发表评论。用户只能看到自己的评论。
场景是
e、 g用户角色是学生和讲师。学生可以对课程发表评论,这是一种自定义的帖子类型。讲师可以看到他的评论,然后回复。同一个学生约翰只能看到他的评论和老师对他的评论的回复。
我用了link 也可使用comment_form 供参考。
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 );
在此处输入代码 <ol class=\"commentlist\"> fsdfds <?php wp_list_comments( apply_filters( \'woocommerce_product_review_list_args\', array( \'callback\' => \'woocommerce_comments\' ) ) ); ?> </ol&