Am creat o taxonomie cu codul
add_action( 'init', 'create_protocols_taxonomies', 0 );
function create_protocols_taxonomies()
{
$labels = array(
'name' => _x( 'Protocols', 'Protocols A to Z' ),
'singular_name' => _x( 'Genre', 'Protocols A to Z' ),
'search_items' => __( 'Search Protocols' ),
'all_items' => __( 'All Protocols' ),
'parent_item' => __( 'Parent Protocols' ),
'parent_item_colon' => __( 'Parent Protocols:' ),
'edit_item' => __( 'Edit Protocols' ),
'update_item' => __( 'Update Protocols' ),
'add_new_item' => __( 'Add New Protocols' ),
'new_item_name' => __( 'New Protocols Name' ),
'menu_name' => __( 'Protocols' ),
);
register_taxonomy('protocols','post', array(
'show_in_nav_menus' => true,
'hierarchical' => true,
'labels' => $labels,
'show_ui' => true,
'rewrite' => array( 'slug' => 'protocols' ),
'supports' => array('title','editor')
));
}
Cand selectez „All Posts”(folosesc versiunea in engleza), Coloanele case se vad sunt defaulturile „Title”, „Author”, „Catogories”, „Tags”, „Date”. Aici vreau sa adaug si „Protocols” , noua taxonomie creata.
Multumesc.