• Resolved augiem

    (@augiem)


    This sounds really odd, but if you create a new content type and set the post type to portfolio, the content type will never show up in the Menu list.

    You can reproduce this by:
    Installing WordPress 3.8 and the CCTM plugin
    Create a new content type called portfolio
    Activate it
    Create one portfolio page named anything and publish it
    Go to the Appearance -> Menus page
    Portfolio will be missing
    Go back to the content type and change the name to portfoliox (or anything else really) and save it
    Go back to Appearance -> Menus and you will see it shows up

    Is portfolio a forbidden keyword in WordPress? If so, I imagine there are a number of other keywords that would cause a similarly perplexing situation.

    https://www.ads-software.com/plugins/custom-content-type-manager/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor fireproofsocks

    (@fireproofsocks)

    I have seen some cases where WP has silently reserved words as incompatible for being used as post-type names, so it wouldn’t surprise me — these little landmines are not documented anywhere that I’m aware of.

    In the CCTM.php file I have a variable to track these:

    // Names that are off-limits for custom post types b/c they're already used by WP
    // Re "preview" see https://code.google.com/p/wordpress-custom-content-type-manager/issues/detail?id=321
    public static $reserved_post_types = array('post', 'page', 'attachment', 'revision'
    	, 'nav_menu', 'nav_menu_item', 'preview');

    I wonder if the “portfolio” thing is a new WP addition with 3.8…

    Thread Starter augiem

    (@augiem)

    Okay, that makes sense. Well thanks for the reply!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘post_type cannot be "portfolio"’ is closed to new replies.