WordPress.org

Support

Support » How-To and Troubleshooting » Commenting Restictions

Commenting Restictions

  • Is it possible to restrict certain users from commenting from posts

    like i only wants contributors user group to comment on authors post

    Is their a way to this type of thing ?

Viewing 1 replies (of 1 total)
  • converting2wp
    Participant

    @converting2wp

    As far as I can tell, there is no user capability that maps to being able to post a comment. [If there were you could use a role manager plugin and remove that capability from those roles that you don’t want to have it.]

    But determining whether or not the comment box appears is a function that can be implemented in a theme. How, exactly, to do that depends on your theme.

    The post
    http://rayofsolaris.net/blog/2012/how-to-check-if-comments-are-allowed-in-wordpress

    and the comments_open function have information and examples on how to check and modify the behavior of showing the comment form. To restrict by user level, you’d probably also want the function current_user_can.

    If you are using TwentyEleven, this is doable with a few lines of code, (in a child theme)– adding a filter to functions.php and (perhaps) changing the “comments are closed” message near the end of comments.php.

    Does that help?

Viewing 1 replies (of 1 total)
  • The topic ‘Commenting Restictions’ is closed to new replies.