Tagged: capability
- This topic has 12 replies, 2 voices, and was last updated 10 years, 8 months ago by
Syam Mohan.
-
AuthorPosts
-
February 25, 2015 at 3:03 am #5158
Vasily Zakharov
ParticipantPlease help I need to restrict some roles to read some of my Custom Post Types.
It used to be a capability read_posts but I cannot see it in your plugin. Can you explain how to make it possible with your plugin?
February 25, 2015 at 4:58 am #5161Vasily Zakharov
ParticipantI mean not just one particular post but all posts under the custom post type
And also it would be good to make it conditional to taxonomies.
February 25, 2015 at 10:12 am #5172Syam Mohan
KeymasterHi Vasily,
“read_posts” is not a standard capability. I don’t know how it got there. It will most probably from the plugin you used to create the custom post types. You can use the Add/Remove Capability functionality to add this capability if you think it will fix your issue.
My recommendation is to control the permission by enabling custom capabilities for those custom post types. Start from the role edit screen and look for a box that has your custom post type as title.
Thanks
Syam
February 25, 2015 at 10:20 am #5173Vasily Zakharov
ParticipantThere is a read capability on my custom post type but even it is unticked on the certain user role it still show all posts from this custom post type.
But when I am going through individual posts and changing their capabilities it works fine.
Is there any easy way to block showing all posts from a custom post type.
February 25, 2015 at 10:49 am #5174Syam Mohan
KeymasterThis reply has been marked as private.February 25, 2015 at 10:59 am #5175Vasily Zakharov
ParticipantThis reply has been marked as private.February 25, 2015 at 11:08 am #5177Syam Mohan
KeymasterThis reply has been marked as private.February 25, 2015 at 11:29 am #5178Vasily Zakharov
ParticipantThis reply has been marked as private.February 25, 2015 at 12:17 pm #5180Syam Mohan
KeymasterThis reply has been marked as private.February 25, 2015 at 1:09 pm #5185Vasily Zakharov
ParticipantThis reply has been marked as private.February 25, 2015 at 1:22 pm #5187Syam Mohan
KeymasterThis reply has been marked as private.February 25, 2015 at 1:28 pm #5188Vasily Zakharov
ParticipantThis reply has been marked as private.February 25, 2015 at 1:43 pm #5189Syam Mohan
KeymasterHi Vasily,
Now I understand what you are asking. I was thinking about the wp-admin back end, not the front end. Sorry about that.
The PRO plugin allows you to change the capabilities. But how the capabilities to be used is controlled by the plugin which creates the custom post type. Basically “read_event_sponsor” is defined and controlled by the plugin who creates the Event Sponsor post type not the PRO plugin.
However you can still use Extended Permissions to exclude individual posts. And that is controlled by the PRO plugin. This is the only way you can exclude posts for guest users, because they are not associated with any role.
Hope that makes sense.
Thanks
Syam
-
AuthorPosts
- The topic ‘Read Custom Post Types Capability’ is closed to new replies.
