My question is exactly the same as this, not sure if it can be bumped so thought I’d post again.
Basically I’m trying to create a scenario similar to how comments work. On a page, a registered user can submit a comment, except, only they can see it, no one else. These comments would be called notes.
Is it possible to change the comments so that only the submitted user can see it? I am mainly looking for something that’s right under a post, page, that I can put in a template.
I used _s as a template. The comments are loaded with
wp_list_comments( array( 'callback' => '_s_comment' ) );
and then comments are styled with _s_comment(). That is what you will use.You can use
get_current_user_id()
to get the current user id.You can get the user id of the commenter with
$comment->user_id
. You then check that they both match.The two changes that I made are in line 11 and 20.
I have added the code in a gist and below.