CPT Standorte
if ( ! function_exists('cpt_standorte') ) {
// Register Custom Post Type
function cpt_standorte() {
$labels = array(
'name' => _x( 'Standorte', 'Post Type General Name', 'vr' ),
'singular_name' => _x( 'Standort', 'Post Type Singular Name', 'vr' ),
'menu_name' => __( 'Standorte', 'vr' ),
'name_admin_bar' => __( 'Standorte', 'vr' ),
'archives' => __( 'Standortliste', 'vr' ),
'attributes' => __( 'Standort Eigenschaften', 'vr' ),
'parent_item_colon' => __( 'Parent Item:', 'vr' ),
'all_items' => __( 'Alle Standorte', 'vr' ),
'add_new_item' => __( 'Neuen Standort hinzufügen', 'vr' ),
'add_new' => __( 'Hinzufügen', 'vr' ),
'new_item' => __( 'Neuer Standort', 'vr' ),
'edit_item' => __( 'Standort bearbeiten', 'vr' ),
'update_item' => __( 'Standort aktualisieren', 'vr' ),
'view_item' => __( 'Standort ansehen', 'vr' ),
'view_items' => __( 'Standort ansehen', 'vr' ),
'search_items' => __( 'Standort suchen', 'vr' ),
'not_found' => __( 'Nichts gefunden', 'vr' ),
'not_found_in_trash' => __( 'Nichts im Papierkorb gefunden', 'vr' ),
'featured_image' => __( 'Standort-Vorschaubild', 'vr' ),
'set_featured_image' => __( 'Standort-Bild definieren', 'vr' ),
'remove_featured_image' => __( 'Standortbild entfernen', 'vr' ),
'use_featured_image' => __( 'Als Standortbild verwenden', 'vr' ),
'insert_into_item' => __( 'in den Standort einfügen', 'vr' ),
'uploaded_to_this_item' => __( 'Zu diesem Standort hochgeladen', 'vr' ),
'items_list' => __( 'Standortliste', 'vr' ),
'items_list_navigation' => __( 'Standortliste Navigation', 'vr' ),
'filter_items_list' => __( 'Standortliste filtern', 'vr' ),
);
$args = array(
'label' => __( 'Standort', 'vr' ),
'description' => __( 'Standorte', 'vr' ),
'labels' => $labels,
'supports' => array( 'title', 'editor' ),
'taxonomies' => array( 'standortart' ),
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-businesswoman',
'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' => 'post',
);
register_post_type( 'standorte', $args );
}
add_action( 'init', 'cpt_standorte', 0 );
}