Hello,
I have created a simple custom post type plugin using https://developer.projectdmc.org/reference/functions/register_post_type/#user-contributed-notes.
The CPT is appearing in the admin and I can add/edit posts, but it is not appearing in the Assigned Post Type dropdown under the Post Data > Settings tab.
Two other CPTs from the Event Calendar and Listings from Toolset are appearing in the dropdown.
I have included the CPT plugin code for reference. Maybe I am missing something.
function flagstaffcounty_ideas_post_type() {
$labels = array(
'name' => __( 'Ideas', 'flagstaffcounty' ),
'singular_name' => __( 'Idea', 'flagstaffcounty' ),
'add_new' => __( 'Add New', 'flagstaffcounty' ),
'add_new_item' => __( 'Add New Idea', 'flagstaffcounty' ),
'edit_item' => __( 'Edit Idea', 'flagstaffcounty' ),
'new_item' => __( 'New Idea', 'flagstaffcounty' ),
'view_item' => __( 'View Idea', 'flagstaffcounty' ),
'view_items' => __( 'View Ideas', 'flagstaffcounty' ),
'search_items' => __( 'Search Ideas', 'flagstaffcounty' ),
'not_found' => __( 'No Ideas found.', 'flagstaffcounty' ),
'not_found_in_trash' => __( 'No Ideas found in Trash.', 'flagstaffcounty' ),
'parent_item_colon' => __( 'Parent Ideas:', 'flagstaffcounty' ),
'all_items' => __( 'All Ideas', 'flagstaffcounty' ),
'archives' => __( 'Idea Archives', 'flagstaffcounty' ),
'attributes' => __( 'Idea Attributes', 'flagstaffcounty' ),
'menu_name' => __( 'Ideas', 'flagstaffcounty' ),
'filter_items_list' => __( 'Filter Idea list', 'flagstaffcounty' ),
'filter_by_date' => __( 'Filter by date', 'flagstaffcounty' ),
'items_list_navigation' => __( 'Ideas list navigation', 'flagstaffcounty' ),
'items_list' => __( 'Ideas list', 'flagstaffcounty' ),
'item_published' => __( 'Idea published.', 'flagstaffcounty' ),
'item_published_privately' => __( 'Idea published privately.', 'flagstaffcounty' ),
'item_reverted_to_draft' => __( 'Idea reverted to draft.', 'flagstaffcounty' ),
'item_scheduled' => __( 'Idea scheduled.', 'flagstaffcounty' ),
'item_updated' => __( 'Idea updated.', 'flagstaffcounty' ),
);
$args = array(
'labels' => $labels,
'description' => __( 'Organize user-submitted ideas, comments, and likes', 'flagstaffcounty' ),
'public' => false,
'has_archive' => false,
'hierarchical' => false,
'exclude_from_search' => false,
'publicly_queryable' => false,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => false,
'show_in_admin_bar' => false,
'show_in_rest' => true,
'menu_position' => null,
'capability_type' => 'post',
'capabilities' => array(),
'supports' => array( 'title', 'editor', 'revisions' ),
'taxonomies' => array(),
'rewrite' => array( 'slug' => 'ideas' ),
'query_var' => true,
'can_export' => true,
'delete_with_user' => false,
);
register_post_type( 'ideas', $args );
}
add_action( 'init', 'flagstaffcounty_ideas_post_type');
Cheers,