silam-family-product
if ( ! function_exists( 'vdl_product_family' ) ) {
// Register Custom Taxonomy
function vdl_product_family() {
$labels = array(
'name' => _x( 'Familia producto', 'Taxonomy General Name', 'silam' ),
'singular_name' => _x( 'Familia producto', 'Taxonomy Singular Name', 'silam' ),
'menu_name' => __( 'Familia del producto', 'silam' ),
'all_items' => __( 'All Items', 'silam' ),
'parent_item' => __( 'Parent Item', 'silam' ),
'parent_item_colon' => __( 'Parent Item:', 'silam' ),
'new_item_name' => __( 'New Item Name', 'silam' ),
'add_new_item' => __( 'Add New Item', 'silam' ),
'edit_item' => __( 'Edit Item', 'silam' ),
'update_item' => __( 'Update Item', 'silam' ),
'separate_items_with_commas' => __( 'Separate items with commas', 'silam' ),
'search_items' => __( 'Search Items', 'silam' ),
'add_or_remove_items' => __( 'Add or remove items', 'silam' ),
'choose_from_most_used' => __( 'Choose from the most used items', 'silam' ),
'not_found' => __( 'Not Found', 'silam' ),
);
$args = array(
'labels' => $labels,
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => true,
);
register_taxonomy( 'family', array( 'products' ), $args );
}
// Hook into the 'init' action
add_action( 'init', 'vdl_product_family', 0 );
}