WordPress.org

Ready to get started?Download WordPress

Forums

Commenting Restictions (2 posts)

  1. surya300
    Member
    Posted 1 year ago #

    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 ?

  2. converting2wp
    Member
    Posted 1 year ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.