Ich habe in WordPress einen neuen benutzerdefinierten Beitragstyp (Earnings Transcripts) mit dem folgenden Code erstellt. Der Name meines benutzerdefinierten Beitragstyps lautet “Verdienstabrechnungen” das sind 2 Wörter. So sollte die Schnecke sein “Verdienstnachweise”. Stattdessen ist die URL “Verdienstnachweise”. Was fehlt mir hier?
function custom_post_type() {
// Earnings Transcripts
$labels = array(
'name' => _x( 'Earnings Transcripts', 'Post Type General Name', 'twentysixteen' ),
'singular_name' => _x( 'Earnings Transcripts', 'Post Type Singular Name', 'twentysixteen' ),
'menu_name' => __( 'Earnings Transcripts', 'twentysixteen' ),
'parent_item_colon' => __( 'Parent Earnings Transcripts', 'twentysixteen' ),
'all_items' => __( 'All Earnings Transcripts', 'twentysixteen' ),
'view_item' => __( 'View Earnings Transcripts', 'twentysixteen' ),
'add_new_item' => __( 'Add New Earnings Transcripts', 'twentysixteen' ),
'add_new' => __( 'Add New', 'twentysixteen' ),
'edit_item' => __( 'Edit Earnings Transcripts', 'twentysixteen' ),
'update_item' => __( 'Update Earnings Transcripts', 'twentysixteen' ),
'search_items' => __( 'Search Earnings Transcripts', 'twentysixteen' ),
'not_found' => __( 'Not Found', 'twentysixteen' ),
'not_found_in_trash' => __( 'Not found in Trash', 'twentysixteen' ),
);
$args = array(
'label' => __( 'Earnings Transcripts', 'twentysixteen' ),
'description' => __( 'Earnings Transcripts', 'twentysixteen' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields', ),
'taxonomies' => array( 'Earnings Transcripts' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_admin_bar' => true,
'menu_position' => 5,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'page',
);
// Registering your Custom Post Type
register_post_type( 'Earnings Transcripts', $args );
}
add_action( 'init', 'custom_post_type', 0 );