Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*create color custom taxonomy for "event" custom post type. */
- function dct_tax_color() {
- $keyword = 'Color';
- $taxslug = 'color';
- $labels = array(
- 'name' => $keyword . 's',
- 'singular_name' => $keyword,
- 'add_new' => 'Add New',
- 'edit' => 'Edit',
- 'edit_item' => 'Edit ' . $keyword . 's',
- 'new_item' => 'New ' . $keyword . 's',
- 'all_items' => 'All ' . $keyword . 's',
- 'not_found' => 'No ' . $keyword . ' found',
- 'menu_name' => $keyword . 's',
- 'view_item' => 'View ' . $keyword,
- 'update_item' => 'Update ' . $keyword,
- 'add_new_item' => 'Add New ' . $keyword,
- 'new_item_name' => 'New ' . $keyword . ' Name',
- 'parent_item' => 'Parent ' . $keyword,
- 'parent_item_colon' => 'Parent ' . $keyword . ':',
- 'search_items' => 'Search ' . $keyword . 's',
- 'not_found' => 'No ' . $keyword . ' found.',
- );
- $args = array(
- 'labels' => $labels,
- 'public' => true,
- 'has_archive' => true,
- 'rewrite' => array('slug' => $taxslug),
- 'exclude_from_search' => false,
- 'publicly_queryable' => true,
- 'show_ui' => true,
- 'map_meta_cap' => true,
- 'show_tagcloud' => false,
- 'show_admin_column' => true,
- 'description' => 'Sub sections of Money Posts',
- 'hierarchical' => true,
- 'sort' => true,
- );
- register_taxonomy($taxslug, 'event', $args);
- }
- add_action( 'init', 'dct_tax_color' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement