Is there a way to make it so Everyone can see comments, But only the post author or those belonging to the Premium role can post a comment?
Could I do something like
global $current_user;
get_currentuserinfo();
if (is_user_logged_in() && $current_user->ID == $post->post_author) { comment_form();
} else {
if( $current_user->roles[0] == 'admin' || $current_user->roles[0] == 'premium' )
{ comment_form(); } endif;
else {
echo '<h4>You are not allowed to post comments.</h4>';
}
Sorry I should have said, there are two roles, basic and premium. Both can make posts. But Only premium can comment on anyones posts, and Basic can only comment on their own posts