Created
April 22, 2016 11:59
-
-
Save themepaint/b3755d6c8d6070dac40643c6ce8210e9 to your computer and use it in GitHub Desktop.
Register Custom Taxonomy Woocommerce Products
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Register Custom Taxonomy | |
function ess_custom_taxonomy_Item() { | |
$labels = array( | |
'name' => 'Brands', | |
'singular_name' => 'Brand', | |
'menu_name' => 'Brands', | |
'all_items' => 'All Brands', | |
'parent_item' => 'Parent Brand', | |
'parent_item_colon' => 'Parent Brand:', | |
'new_item_name' => 'New Brand Name', | |
'add_new_item' => 'Add New Brand', | |
'edit_item' => 'Edit Brand', | |
'update_item' => 'Update Brand', | |
'separate_items_with_commas' => 'Separate Brand with commas', | |
'search_items' => 'Search Brands', | |
'add_or_remove_items' => 'Add or remove Brands', | |
'choose_from_most_used' => 'Choose from the most used Brands', | |
); | |
$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( 'item', 'product', $args ); | |
} | |
add_action( 'init', 'ess_custom_taxonomy_item', 0 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Me too! I was wondering if its possible to show as a filter