Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //create two taxonomies, genres and tags for the post type "tag"
- function create_tag_taxonomies()
- {
- // Add new taxonomy, NOT hierarchical (like tags)
- $labels = array(
- 'name' => _x( 'Tagsu', 'taxonomy general name' ),
- 'singular_name' => _x( 'Tagu', 'taxonomy singular name' ),
- 'search_items' => __( 'Search Tags' ),
- 'popular_items' => __( 'Popular Tags' ),
- 'all_items' => __( 'All Tags' ),
- 'parent_item' => null,
- 'parent_item_colon' => null,
- 'edit_item' => __( 'Edit Tagu' ),
- 'update_item' => __( 'Update Tagu' ),
- 'add_new_item' => __( 'Add New Tagu' ),
- 'new_item_name' => __( 'New Tagu Name' ),
- 'separate_items_with_commas' => __( 'Separate tags with commas' ),
- 'add_or_remove_items' => __( 'Add or remove tags' ),
- 'choose_from_most_used' => __( 'Choose from the most used tags' ),
- 'menu_name' => __( 'Tagsu' ),
- );
- register_taxonomy('tagsu','projects' ,array(
- 'hierarchical' => false,
- 'labels' => $labels,
- 'show_ui' => true,
- 'update_count_callback' => '_update_post_term_count',
- 'query_var' => true,
- 'rewrite' => array( 'slug' => 'tags' ),
- ));
- }
Advertisement
Add Comment
Please, Sign In to add comment