Taxonomia tipo proyecto para portfolio
if ( ! function_exists( 'project_type_custom_taxonomy' ) ) {
// Register Custom Taxonomy
function project_type_custom_taxonomy() {
$labels = array(
'name' => _x( 'Tipos de proyectos', 'Taxonomy General Name', 'aps_andplay' ),
'singular_name' => _x( 'Tipo de proyecto', 'Taxonomy Singular Name', 'aps_andplay' ),
'menu_name' => __( 'Tipos de proyectos', 'aps_andplay' ),
'all_items' => __( 'All Items', 'aps_andplay' ),
'parent_item' => __( 'Parent Item', 'aps_andplay' ),
'parent_item_colon' => __( 'Parent Item:', 'aps_andplay' ),
'new_item_name' => __( 'New Item Name', 'aps_andplay' ),
'add_new_item' => __( 'Add New Item', 'aps_andplay' ),
'edit_item' => __( 'Edit Item', 'aps_andplay' ),
'update_item' => __( 'Update Item', 'aps_andplay' ),
'view_item' => __( 'View Item', 'aps_andplay' ),
'separate_items_with_commas' => __( 'Separate items with commas', 'aps_andplay' ),
'add_or_remove_items' => __( 'Add or remove items', 'aps_andplay' ),
'choose_from_most_used' => __( 'Choose from the most used', 'aps_andplay' ),
'popular_items' => __( 'Popular Items', 'aps_andplay' ),
'search_items' => __( 'Search Items', 'aps_andplay' ),
'not_found' => __( 'Not Found', 'aps_andplay' ),
'no_terms' => __( 'No items', 'aps_andplay' ),
'items_list' => __( 'Items list', 'aps_andplay' ),
'items_list_navigation' => __( 'Items list navigation', 'aps_andplay' ),
);
$rewrite = array(
'slug' => 'tipo-de-proyecto',
'with_front' => true,
'hierarchical' => false,
);
$args = array(
'labels' => $labels,
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => true,
'rewrite' => $rewrite,
'show_in_rest' => true,
'rest_base' => 'projects-types',
);
register_taxonomy( 'project_type_taxonomy', array( 'project_post_type' ), $args );
}
add_action( 'init', 'project_type_custom_taxonomy', 0 );
}