edit_comment capability for subscriber
Have you tried $subscriber= get_role(‘subscriber’); $subscriber->add_cap(‘edit_comment’); NOTE eidt_comment is only supported in verson 3.1 or later This worked for me , hope it helps you!
Have you tried $subscriber= get_role(‘subscriber’); $subscriber->add_cap(‘edit_comment’); NOTE eidt_comment is only supported in verson 3.1 or later This worked for me , hope it helps you!
I had the same issue, main users have the contributor role and a simple sidebar comment sidebar widget was not working when logged-in! Strange. I solved it by some sql: function getLatestComments ( $postid ) { global $wpdb; $sql = “SELECT * from $wpdb->comments WHERE comment_post_ID = $postid AND comment_approved = 1 ORDER BY comment_ID … Read more
You could install one of many plugins like this to restrict access for different user roles http://wordpress.org/plugins/advanced-access-manager/ Or you could remove the admin menu links to any items you want for a specific user using PHP code.
Capabilites not working [closed]
Editing super admin capabilities is a little different from editing the capabilities of every other role, because there is a slight detour in the way WP checks the current user’s capabilities. This is what you find on capabilities.php on line 864: function has_cap( $cap ) { // (…) // Multisite super admin has all caps … Read more
After further testing, the problem was found to be caused by another filter, posts_where, which was registered to support searching also in custom fields, and that’s why only searching is affected. Originally it generates something like this, so if the OR statement returns true (when one of the custom fields includes foo), that post will … Read more
How to restrict access to specific pages on the back-end?
The edit_others_posts capability should allow users to set the author of a post. At first glance you might reply that you don’t want your authors to be able to edit one another’s posts. The difference in ability is very subtle though: writing a post and then assigning it to another user isn’t much different from … Read more
Add custom capabilities to existing custom post type
Custom Role for CPT Only