
Untitled
By: a guest on
Aug 19th, 2012 | syntax:
None | size: 1.60 KB | hits: 11 | expires: Never
################################################################################
// AUTHOR CUSTOM TAXONOMY
################################################################################
add_action( 'init', 'register_taxonomy_authors' );
function register_taxonomy_authors() {
$labels = array(
'name' => _x( 'Authors', 'authors' ),
'singular_name' => _x( 'Anthor', 'authors' ),
'search_items' => _x( 'Search Authors', 'authors' ),
'popular_items' => _x( 'Popular Authors', 'authors' ),
'all_items' => _x( 'All Authors', 'authors' ),
'parent_item' => _x( 'Parent Anthor', 'authors' ),
'parent_item_colon' => _x( 'Parent Anthor:', 'authors' ),
'edit_item' => _x( 'Edit Anthor', 'authors' ),
'update_item' => _x( 'Update Anthor', 'authors' ),
'add_new_item' => _x( 'Add New Anthor', 'authors' ),
'new_item_name' => _x( 'New Anthor', 'authors' ),
'separate_items_with_commas' => _x( 'Separate authors with commas', 'authors' ),
'add_or_remove_items' => _x( 'Add or remove Authors', 'authors' ),
'choose_from_most_used' => _x( 'Choose from most used authors', 'authors' ),
'menu_name' => _x( 'Authors', 'authors' ),
);
$args = array(
'labels' => $labels,
'public' => true,
'show_in_nav_menus' => true,
'show_ui' => true,
'show_tagcloud' => true,
'hierarchical' => false,
'update_count_callback' => '_update_post_term_count',
'rewrite' => true,
'query_var' => true
);
register_taxonomy( 'authors', array('product'), $args );
}