开发者

Show comments only to author and admins

Is it possible to restrict a user so that they only see their own comments along with any admin user replies and for the admin开发者_C百科 user to see all users comments?

The user should also be able to edit their own comments.

I am trying to use sessions to do that.......but unable to achieve how can do using session by retrieving user_id of particular current user in wordpress?


In wordpress you can get current users data with function wp_get_current_user(); check http://codex.wordpress.org/Function_Reference/wp_get_current_user .

To restict user to view only his/her comments, you have to alter wordpress's theme's comments.php file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜