Element taxonomy for products
// Register Custom Taxonomy
function arm_product_element_taxonomy() {
$labels = array(
'name' => _x( 'Elements', 'Taxonomy General Name', 'aroma' ),
'singular_name' => _x( 'Element', 'Taxonomy Singular Name', 'aroma' ),
'menu_name' => __( 'Element', 'aroma' ),
'all_items' => __( 'All Elements', 'aroma' ),
'parent_item' => __( 'Parent Element', 'aroma' ),
'parent_item_colon' => __( 'Parent Element:', 'aroma' ),
'new_item_name' => __( 'New Element Name', 'aroma' ),
'add_new_item' => __( 'Add New Element', 'aroma' ),
'edit_item' => __( 'Edit Element', 'aroma' ),
'update_item' => __( 'Update Element', 'aroma' ),
'view_item' => __( 'View Element', 'aroma' ),
'separate_items_with_commas' => __( 'Separate Elements with commas', 'aroma' ),
'add_or_remove_items' => __( 'Add or remove Elements', 'aroma' ),
'choose_from_most_used' => __( 'Choose from the most used', 'aroma' ),
'popular_items' => __( 'Popular Elements', 'aroma' ),
'search_items' => __( 'Search Elements', 'aroma' ),
'not_found' => __( 'Not Found', 'aroma' ),
);
$rewrite = array(
'slug' => 'elements',
'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' => false,
'rewrite' => $rewrite,
);
register_taxonomy( 'product_element', array( 'product' ), $args );
}
// Hook into the 'init' action
add_action( 'init', 'arm_product_element_taxonomy', 0 );