WordPress.org

Ready to get started?Download WordPress

Forums

Custom Post Type UI
[resolved] Custom capability does not save in advanced options (5 posts)

  1. anmari
    Member
    Posted 2 years ago #

    If attempting to add a custom capability type in your "advanced options" for a custom post type, the custom type will not save - keeps reverting to 'post' after click "save custom posttype".

    This is on version 0.7.1

    on both 3.2.1 and nightly build

    http://wordpress.org/extend/plugins/custom-post-type-ui/

  2. scottconnerly
    Member
    Posted 2 years ago #

    Technically, it does. If you check the DB, it saves correctly.
    However, since the cpt_custom_post_type[capability_type] input has two value fields on it (value="post" value="<?php echo esc_attr($cpt_capability); ?>") only one can show, and it picks the first one, "post". Its only a display bug. A bad one, but a display bug none the less.

  3. Ov3rfly
    Member
    Posted 2 years ago #

    @scottconnerly: Thanks for heads-up, wasted some hours on this before finding your post.

    IMO a real bug, not only a display bug, as value gets overwritten by default if you change something else later without updating the capability type manually again.

  4. mikejandreau
    Member
    Posted 2 years ago #

    I'm having the same issue here.

    Although the capability is saved, it doesn't seem to work.

    I'm using the Members plugin's role manager to create new capabilities, and then setting them for each custom post type, and they don't show.

    The only way that they show is if I set it back to "post" and give the role access to the various post capabilities.

    Suggestions on why this doesn't work, and how we can repair it to give certain roles access to the various custom post types that are created with this plugin?

  5. Ov3rfly
    Member
    Posted 2 years ago #

    Here is an older tutorial which explains how custom post types work with capabilites and how they have to be named etc.:

    http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress

    Hope it helps.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic