Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am having issues with using custom post types and custom user roles. I created a custom post type called Businesses. Then I created capabilities for users of a certain type to be able to add and edit business listings. The problem I am having is when I create the user type and add the capabilities of edit_business, edit_businesses, read_business, publish_businesses, the user has the ability to edit other peoples businesses. I can't figure out why this is happening.

A snippet of the code I used to create the capabilities is 'capabilities' => array( 'edit_post' => 'edit_business', 'edit_posts' => 'edit_business', 'edit_others_posts' => 'edit_others_businesses', 'publish_posts' => 'publish_businesses', 'read_post' => 'read_business', 'read_private_posts' => 'read_private_businesses', 'delete_post' => 'delete_business' )

Any help understanding this would be appreciated

share|improve this question
    
Could you please post in full registration code for your CPT and user role? This doesn't seem enough to make a guess what is broken to me. –  Rarst Oct 26 '12 at 22:15
add comment

1 Answer 1

up vote 0 down vote accepted

So I figured out the problem here. When you use the members plugin and create roles for custom post types you need to create a function which maps out your meta capabilities. http://justintadlock.com/archives/2010/07/10/meta-capabilities-for-custom-post-types

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.