- February 25, 2015 at 3:03 am #5158
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?February 25, 2015 at 4:58 am #5161
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.February 25, 2015 at 10:12 am #5172
“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.
SyamFebruary 25, 2015 at 10:20 am #5173
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.February 25, 2015 at 10:49 am #5174February 25, 2015 at 10:59 am #5175February 25, 2015 at 11:08 am #5177February 25, 2015 at 11:29 am #5178February 25, 2015 at 12:17 pm #5180February 25, 2015 at 1:09 pm #5185February 25, 2015 at 1:22 pm #5187February 25, 2015 at 1:28 pm #5188February 25, 2015 at 1:43 pm #5189
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.
The topic ‘Read Custom Post Types Capability’ is closed to new replies.