Remap or register existing post type to CPT UI exported as function.php snippet
-
Dear CPT UI developers,
I’ve exported a custom post type years ago to a function.php snippet.function cptui_register_my_cpts_team() { $labels = array( "name" => __( 'team', '' ), "singular_name" => __( 'team', '' ), ); $args = array( "label" => __( 'team', '' ), "labels" => $labels, "description" => "", "public" => true, "publicly_queryable" => true, "show_ui" => true, "show_in_rest" => true, "rest_base" => "", "has_archive" => false, "show_in_menu" => true, "exclude_from_search" => false, "capability_type" => "post", "map_meta_cap" => true, "hierarchical" => false, "rewrite" => array( "slug" => "team", "with_front" => true ), "query_var" => true, "menu_icon" => "dashicons-admin-users", "supports" => array( "title", "editor", "thumbnail", "custom-fields", "revisions" ), ); register_post_type( "team", $args ); }
This post type works flawlessly, but I’d like to “remap” this existing post type to the CPT UI.
When I try to define a new post type with this name I get an error message (Post type already exists).
So my question is there any way to remap/register this existing post type to be controlled via CPT UI?Best regards,
herrstrietzel
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Remap or register existing post type to CPT UI exported as function.php snippet’ is closed to new replies.