Custom Taxonomy Example
Ein Custom Taxonomy Code-Snippet, der mir als Vorlage dient
// Register Custom Taxonomy function standort_mitarbeiter() { $labels = array( 'name' => _x( 'Standorte', 'Taxonomy General Name', 'text_domain' ), 'singular_name' => _x( 'Standorte', 'Taxonomy Singular Name', 'text_domain' ), 'menu_name' => __( 'Standorte', 'text_domain' ), 'all_items' => __( 'Alle Standorte', 'text_domain' ), 'parent_item' => __( '', 'text_domain' ), 'parent_item_colon' => __( '', 'text_domain' ), 'new_item_name' => __( 'Neuer Standort', 'text_domain' ), 'add_new_item' => __( 'Neuer Standort', 'text_domain' ), 'edit_item' => __( 'Standort bearbeiten', 'text_domain' ), 'update_item' => __( '', 'text_domain' ), 'view_item' => __( '', 'text_domain' ), 'separate_items_with_commas' => __( '', 'text_domain' ), 'add_or_remove_items' => __( '', 'text_domain' ), 'choose_from_most_used' => __( '', 'text_domain' ), 'popular_items' => __( '', 'text_domain' ), 'search_items' => __( '', 'text_domain' ), 'not_found' => __( 'Nicht gefunden', 'text_domain' ), ); $rewrite = array( 'slug' => 'mitarbeiter-standort', 'with_front' => true, 'hierarchical' => false, ); $args = array( 'labels' => $labels, 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_admin_column' => true, 'show_in_nav_menus' => true, 'show_tagcloud' => true, 'rewrite' => $rewrite, ); register_taxonomy( 'taxonomy', array( 'mitarbeiter' ), $args ); } add_action( 'init', 'standort_mitarbeiter', 0 );