- This topic has 12 replies, 2 voices, and was last updated 10 years ago by .
Viewing 13 posts - 1 through 13 (of 13 total)
Viewing 13 posts - 1 through 13 (of 13 total)
- The topic ‘Read Custom Post Types Capability’ is closed to new replies.
Tagged: capability
Please 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?
I 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.
Hi 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
There 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.
Hi 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