WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Custom post types and add_cap() (2 posts)

  1. rudolf
    Member
    Posted 4 years ago #

    I'm trying to create a custom post type that only certain user roles can access. For example, if I specify 'capability_type' => 'podcast' when I register the podcast custom post type, should I then be able to do this?

    $role =& get_role('administrator');
    $role->add_cap('edit_podcasts');

    It doesn't seem to be working for me; the new podcast post type doesn't show up in the left-hand menu.

  2. rudolf
    Member
    Posted 4 years ago #

    Self-solved. I hadn't given admin the read_podcasts capability.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.