Good news, bad news..
Good news
The logic behind it is really simple. You basically wrap the form inside of a simple if statement.
if(condition){
/*Your form here*/
}
else {echo '<h4>You need to be a premium account to post comments</h4>';}
Bad News
You’ll need to code in another user role. This can usually be done via a plugin. Most plugins offer documentation on how to check for a user’s user-role.
So if the plugin has a function like
get_user_role();
You’d simply place that as your condition. That would look something like this:
if(get_user_role() == 'premium'){
/*Your form here*/
}
else {echo '<h4>You need to be a premium account to post comments</h4>';}
Related Posts:
- how to make author to write comment on only his own posts?
- Why are authors allowed to approve comments on their posts? How to revoke privilege?
- How to change the email notification recipient (user) for new comments?
- Change Comment Author Display Name
- Check If comment author is registered
- Comment Author Name In Reply Form
- Display all comments or recent comments per user on author page
- Add a drop down list to comment form?
- Prevent Contributor to show comment list
- Expanding the allowed HTML tags in comments?
- How to check if commenter is the_author?
- Let user edit his own comment
- Capability for allowing user to post own comments without moderation
- edit comments capability for authors
- Why do comment moderators need to have all create/edit/delete toboth posts and pages?
- How to allow a particular role like Contributor be able to only view pending comments and approve them?
- Users with custom roles can’t read each other’s comments
- Hide notifications regarding new comments
- List user comments in author page
- Author can only see own post comment and can moderate
- WordPress comments on users profile
- Comment displaying full name even after setting another display name?
- Same email for all comments
- Notify post author for a new comment on his post?
- Show comments of a user post only when they are login
- Grant a person permission to moderate all comments on a blog without giving them the ability to edit other peoples post
- How many members have made comments approved for an article?
- Commentlist: bypostauthor problem with children list
- get_comment_author_link not working properly
- Get Comment Author ID on the fly while posting
- Show image next to the comment author if have certain role
- Is there a way to only allow certain user ranks to comment on a post
- How can I hide comment of the authors from their published posts?
- WordPress Custom Local Avatar not showing in comments
- Attaching author tag to the comment
- How to prevent users/authors from seing IP/email of new commentators?
- Author name length character limit?
- Comments counter only for Authors Posts
- Showing different images depending on user role
- Why the capability ‘activate_plugins’ is needed to allow a role to see all posts/pages/comments?
- Comments pagination on author page
- Change author, disable comments, enable trackbacks for all items in library
- Prevent author from editing comments from others in their post
- URLs to user page is broken
- Listing comment author role code problem
- How to ‘If Author’ Comments Check
- Auto approve all comments (editor)
- How do I comment out a block of tags in XML?
- R: Comment out block of code
- Why do I get comment spam even with Akismet and Captcha?
- What tools are available for managing/writing to WordPress? [closed]
- How to rearrange fields in comment_form()
- setting comments off as default for pages and custom post types?
- Select subscriber as author of post in admin panel?
- Is it possible to pull comments from facebook into your blog?
- Filtering the Admin Comments List to Show Only Comments from the Current User?
- Non-threaded comment replies with link to original comment
- Approve comment hook?
- Commenting in user profile page?
- How to change “You must be logged in to post a comment.”
- comment_post_ID 0 (cannot remove from dashboard)
- Disable comments on all posts/pages
- How do I delete all comments from a specific old blog post?
- Removing the “Website” Field from Comments and Replies?
- Stop WordPress redirecting comment-page-1 to the post page?
- Importing old Disqus comments into WordPress
- How to add a class to the comment submit button?
- How to wrap submit button of comment form with div
- How to enable comments for pending and draft posts?
- Using WordPress’ WYSIWYG for comments
- Enable Submit Comment Without Page Reload (Using Ajax)?
- What for is the table “wp_commentmeta” exactly?
- Getting Post Comments for post ID using WP_Query() and a Custom Loop?
- Add option to disable comments on a per posts basis?
- Publish author posts only with editor approval?
- How to let contributors to create a new revision(draft) editing their published posts
- Resetting comment count
- When importing – failed to import: Invalid post type feedback
- Redirect user to a custom url after submitting the comment
- Paginate result set from $wpdb->get_results()
- Would switching to InnoDB from MyISAM improve performance of comments table?
- Custom comment type based on thread level
- How to add internal, revision comments to page updates
- How to load and show comments with AJAX instead of pagination?
- Linking to Page Showing Only Comments Without Parent Post
- Comment Reply javascript
- How do we remove the H3 tag for the reply-title I.D
- Comments not appearing at all
- comments reply script not working
- How to display comment form error messages in the same page
- 3 moderators to approve comment
- How to deal with small scale comment spam on small commercial sites? [closed]
- Help to condense/optimize some working code
- Display Authors Comments on Profile Page
- What should I do to make generated avatars different for anonymous comments?
- A plugin where users can comment with Facebook or Twitter or OpenID [closed]
- Comments screen in backend, how to disable email address of commenter for non admins
- Add comments from the admin panel?
- How can I limit the number of comments per registered user per day?
- One comment per user per post but be able to reply to existing comments