TAQ mpp CPT
// Register Custom Post Type
function tq_pb_cpt() {
$labels = array(
'name' => _x( 'Projektberichte', 'Post Type General Name', 'text_domain' ),
'singular_name' => _x( 'Projektbericht', 'Post Type Singular Name', 'text_domain' ),
'menu_name' => __( 'Projektberichte', 'text_domain' ),
'name_admin_bar' => __( 'Projektberichte', 'text_domain' ),
'parent_item_colon' => __( 'Übergeordneter Projektbericht', 'text_domain' ),
'all_items' => __( 'Alle Projektberichte', 'text_domain' ),
'add_new_item' => __( 'Neuen Projektbericht hinzufügen', 'text_domain' ),
'add_new' => __( 'Projektbericht hinzufügen', 'text_domain' ),
'new_item' => __( 'Neuer Projektbericht', 'text_domain' ),
'edit_item' => __( 'Projektbericht bearbeiten', 'text_domain' ),
'update_item' => __( 'Projektbericht updaten', 'text_domain' ),
'view_item' => __( 'Projektbericht ansehen', 'text_domain' ),
'search_items' => __( 'Projektbericht suchen', 'text_domain' ),
'not_found' => __( 'Keinen Projektbericht gefunden', 'text_domain' ),
'not_found_in_trash' => __( 'Keinen Projektbericht im Papierkorb gefunden', 'text_domain' ),
);
$args = array(
'label' => __( 'tq_projektberichte', 'text_domain' ),
'description' => __( 'Verwaltung von Projektberichten', 'text_domain' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', 'author', 'revisions', 'page-attributes', 'post-formats', ),
'taxonomies' => array( 'tq_pb_ct' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-welcome-widgets-menus',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'page',
);
register_post_type( 'tq_projektberichte', $args );
}
// Hook into the 'init' action
add_action( 'init', 'tq_pb_cpt', 0 );