CPL | cpt_products
// Register Custom Post Type
function cpt_products() {
$labels = array(
'name' => _x( 'Produkte', 'Post Type General Name', 'complete' ),
'singular_name' => _x( 'Produkt', 'Post Type Singular Name', 'complete' ),
'menu_name' => __( 'Produkte', 'complete' ),
'name_admin_bar' => __( 'Produkte', 'complete' ),
'archives' => __( 'Produkt Archiv', 'complete' ),
'attributes' => __( 'Produkt Attribute', 'complete' ),
'parent_item_colon' => __( 'Elter Produkt:', 'complete' ),
'all_items' => __( 'Alle Produkte', 'complete' ),
'add_new_item' => __( 'Neues Produkt hinzufügen', 'complete' ),
'add_new' => __( 'Neues Produkt hinzufügen', 'complete' ),
'new_item' => __( 'Neues Produkt', 'complete' ),
'edit_item' => __( 'Produkt bearbeiten', 'complete' ),
'update_item' => __( 'Produkt ändern', 'complete' ),
'view_item' => __( 'Produkt ansehen', 'complete' ),
'view_items' => __( 'Produkte ansehen', 'complete' ),
'search_items' => __( 'Produkt suchen', 'complete' ),
'not_found' => __( 'Nicht gefunden', 'complete' ),
'not_found_in_trash' => __( 'Nicht gefunden im Papierkorb', 'complete' ),
'featured_image' => __( 'Featured Image', 'complete' ),
'set_featured_image' => __( 'Set featured image', 'complete' ),
'remove_featured_image' => __( 'Remove featured image', 'complete' ),
'use_featured_image' => __( 'Use as featured image', 'complete' ),
'insert_into_item' => __( 'In Produkt einfügen', 'complete' ),
'uploaded_to_this_item' => __( 'Zu diesem Produkt hochgeladen', 'complete' ),
'items_list' => __( 'Produkt Liste', 'complete' ),
'items_list_navigation' => __( 'Produkt Listen Navigation', 'complete' ),
'filter_items_list' => __( 'Produkte Liste filtern', 'complete' ),
);
$args = array(
'label' => __( 'Produkt', 'complete' ),
'description' => __( 'Produkte', 'complete' ),
'labels' => $labels,
'supports' => array( 'title' ),
'taxonomies' => array( 'cpt_products_ct_category' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-clipboard',
'show_in_admin_bar' => true,
'show_in_nav_menus' => false,
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => false,
'publicly_queryable' => false,
'rewrite' => false,
'capability_type' => 'page',
);
register_post_type( 'cpt_products', $args );
}
add_action( 'init', 'cpt_products', 0 );