Shopliste
if ( ! function_exists('cpt_shop') ) {
// Register Custom Post Type
function cpt_shop() {
$labels = array(
'name' => _x( 'Shops', 'Post Type General Name', 'my-textdomain' ),
'singular_name' => _x( 'Shop', 'Post Type Singular Name', 'my-textdomain' ),
'menu_name' => __( 'Shops', 'my-textdomain' ),
'name_admin_bar' => __( 'Shop', 'my-textdomain' ),
'archives' => __( 'Shop Archiv', 'my-textdomain' ),
'attributes' => __( 'Shop Eigenschaften', 'my-textdomain' ),
'parent_item_colon' => __( 'Parent Item:', 'my-textdomain' ),
'all_items' => __( 'Alle Shops', 'my-textdomain' ),
'add_new_item' => __( 'Neuer Shop', 'my-textdomain' ),
'add_new' => __( 'Shop erstellen', 'my-textdomain' ),
'new_item' => __( 'Neuer Shop', 'my-textdomain' ),
'edit_item' => __( 'Shop bearbeiten', 'my-textdomain' ),
'update_item' => __( 'Shop aktualisieren', 'my-textdomain' ),
'view_item' => __( 'Shop ansehen', 'my-textdomain' ),
'view_items' => __( 'Shops ansehen', 'my-textdomain' ),
'search_items' => __( 'Shops durchsuchen', 'my-textdomain' ),
'not_found' => __( 'Nicht gefunden', 'my-textdomain' ),
'not_found_in_trash' => __( 'Nicht im Papierkorb gefunden', 'my-textdomain' ),
'featured_image' => __( 'Beitragsbild', 'my-textdomain' ),
'set_featured_image' => __( 'Beitragsbild setzen', 'my-textdomain' ),
'remove_featured_image' => __( 'Beitragsbild entfernen', 'my-textdomain' ),
'use_featured_image' => __( 'Als Featured Image verwenden', 'my-textdomain' ),
'insert_into_item' => __( 'In den Shop einfügen', 'my-textdomain' ),
'uploaded_to_this_item' => __( 'Zu diesem Shop hochgeladen', 'my-textdomain' ),
'items_list' => __( 'Shopliste', 'my-textdomain' ),
'items_list_navigation' => __( 'Shop Listennavigation', 'my-textdomain' ),
'filter_items_list' => __( 'Shopliste filtern', 'my-textdomain' ),
);
$args = array(
'label' => __( 'Shop', 'my-textdomain' ),
'description' => __( 'Shops', 'my-textdomain' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', 'custom-fields', ),
'taxonomies' => array( 'category', 'shop-type' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-editor-code',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'page',
);
register_post_type( 'shop', $args );
}
add_action( 'init', 'cpt_shop', 0 );
}