WordPress.org

Ready to get started?Download WordPress

Forums

Members
[resolved] Custom Post Type (9 posts)

  1. Cristiano
    Member
    Posted 3 years ago #

    Hi there,
    I think Members doesn´t support WP 3.0.1 and its Custom Post Types, right?

    I´m trying to create a Role to allow some group of users just to create an especific post type... the post type appears on the capability list, but it doesn´t work if you just allow the publish that especific post type...

    You need to give it the "publish post" capabilty and then publish in all post type are allowed...

    Any help???

    http://wordpress.org/extend/plugins/members/

  2. Justin Tadlock
    Member
    Plugin Author

    Posted 3 years ago #

    The plugin doesn't control these capabilities and how they are used. It simply provides an interface for you to assign them. So, it's not a question of whether it "supports" something because it will always allow you to assign capabilities. Anything beyond that (dealing with the caps system) is outside the scope of the plugin.

    Most likely, the capabilities for the post type were not handled correctly.

  3. Cristiano
    Member
    Posted 3 years ago #

    Hi Justin,
    Ok, I didn´t express it well...

    The point is: an especific post type is still a post... so, to assign the capability to publish this especific post type I need to assign the general capability "publish post" too... and when I do this, it allows to publish in all post types, not in just the especific one...

    So, there is no way to control it, right?

  4. Cristiano
    Member
    Posted 3 years ago #

    If its not posible with members, could you suggest some solution for this issue?

    I have some types of users... poets, contributors, interviewers... And I want to when someone login, he is just allowed to publish in his "place"...

    I think there are 2 ways: With Post Types (but I can´t control it) or with categories. With categories, I should can define that each user, deppending of his role group, just publish on his default category, without choice...

    Any suggestion?
    Thanks

  5. Rev. Voodoo
    Volunteer Moderator
    Posted 3 years ago #

  6. Cristiano
    Member
    Posted 3 years ago #

    Thanks Rev. Voodoo! I´m trying to follow it, but I have a problem...

    When I create a simple Custom Post using functions.php, it appears on my admin screen. When I add the 'capability_type' => 'whatever', it disappears!!!

    So the following code doesn´t work! I don´t know why!

    add_action( 'init', 'create_my_post_types' );
    
    function create_my_post_types() {
    	register_post_type(
    		'movie',
    		array(
    			'public' => true,
    			'capability_type' => 'movie',
    			'capabilities' => array(
    				'publish_posts' => 'publish_movies',
    				'edit_posts' => 'edit_movies',
    				'edit_others_posts' => 'edit_others_movies',
    				'delete_posts' => 'delete_movies',
    				'delete_others_posts' => 'delete_others_movies',
    				'read_private_posts' => 'read_private_movies',
    				'edit_post' => 'edit_movie',
    				'delete_post' => 'delete_movie',
    				'read_post' => 'read_movie',
    			),
    		)
    	);
    }

    I have the "Members" installed, but the Custom Post Type does not appear on the role capabilities edit screen...

  7. Cristiano
    Member
    Posted 3 years ago #

    Something strange is happening...

    1) First I was using the plugin Custom Post Type UI to create the Custom Posts. When I realized that is better choice to create it by functions, I deleted the Custom Post Type I had created before and deactivated the plugin.

    1) I´m using Members. The capabilities related to that custom post type (that doesn´t exist anymore) are still on my list!

    2) I think when you create a post type and assign it capabilities, you should assign these capabilities to some role, like admin, and then the post type will appear on the admin screen. Ok, but I did exactly like the "movies" exemple aboce, but these capabilities doesn´t appear on my capabilities list...

  8. Cristiano
    Member
    Posted 3 years ago #

    Just now I realized that I need to add caps typing them on Members Edit Roles rather than checking the boxes...

  9. Cristiano
    Member
    Posted 3 years ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags