HYP | Ronny ct_sustainitems
if ( ! function_exists('cpt_sustainitems') ) {
// Register Custom Post Type
function cpt_sustainitems() {
$labels = array(
'name' => _x( 'Items', 'Post Type General Name', 'sustain' ),
'singular_name' => _x( 'Item', 'Post Type Singular Name', 'sustain' ),
'menu_name' => __( 'Items', 'sustain' ),
'name_admin_bar' => __( 'Items', 'sustain' ),
'archives' => __( 'Items Archiv', 'sustain' ),
'attributes' => __( 'Item Attributes', 'sustain' ),
'parent_item_colon' => __( 'Parent Item:', 'sustain' ),
'all_items' => __( 'Alle Items', 'sustain' ),
'add_new_item' => __( 'Neues Item hinzufügen', 'sustain' ),
'add_new' => __( 'Neues Item hinzufügen', 'sustain' ),
'new_item' => __( 'Neues Item', 'sustain' ),
'edit_item' => __( 'Item bearbeiten', 'sustain' ),
'update_item' => __( 'Item ändern', 'sustain' ),
'view_item' => __( 'Item ansehen', 'sustain' ),
'view_items' => __( 'Items ansehen', 'sustain' ),
'search_items' => __( 'Item suchen', 'sustain' ),
'not_found' => __( 'Not found', 'sustain' ),
'not_found_in_trash' => __( 'Not found in Trash', 'sustain' ),
'featured_image' => __( 'Featured Image', 'sustain' ),
'set_featured_image' => __( 'Set featured image', 'sustain' ),
'remove_featured_image' => __( 'Remove featured image', 'sustain' ),
'use_featured_image' => __( 'Use as featured image', 'sustain' ),
'insert_into_item' => __( 'In Item einfügen', 'sustain' ),
'uploaded_to_this_item' => __( 'Zu diese Item hochgeladen', 'sustain' ),
'items_list' => __( 'Items Liste', 'sustain' ),
'items_list_navigation' => __( 'Items Listen Navigation', 'sustain' ),
'filter_items_list' => __( 'Items Liste filtern', 'sustain' ),
);
$rewrite = array(
'slug' => 'items',
'with_front' => true,
'pages' => false,
'feeds' => false,
);
$args = array(
'label' => __( 'Item', 'sustain' ),
'description' => __( 'Items', 'sustain' ),
'labels' => $labels,
'supports' => array( 'title', 'author', 'thumbnail', 'revisions', 'custom-fields', 'page-attributes', ),
'taxonomies' => array( 'ct_sustaincategories' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-awards',
'show_in_admin_bar' => false,
'show_in_nav_menus' => false,
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => false,
'publicly_queryable' => true,
'rewrite' => $rewrite,
'capability_type' => 'page',
'show_in_rest' => false,
);
register_post_type( 'cpt_sustainitems', $args );
}
add_action( 'init', 'cpt_sustainitems', 0 );
}