if ( ! function_exists( 'jw_custom_taxonomy' ) ) { // Register Custom Taxonomy function jw_custom_taxonomy() { $labels = array( 'name' => _x( 'Events', 'Taxonomy General Name', 'joinweb' ), 'singular_name' => _x( 'Event', 'Taxonomy Singular Name', 'joinweb' ), 'menu_name' => __( 'Event', 'joinweb' ), 'all_items' => __( 'All Events', 'joinweb' ), 'parent_item' => __( 'Parent Event', 'joinweb' ), 'parent_item_colon' => __( 'Parent Event:', 'joinweb' ), 'new_item_name' => __( 'New Event Name', 'joinweb' ), 'add_new_item' => __( 'Add New Event', 'joinweb' ), 'edit_item' => __( 'Edit Event', 'joinweb' ), 'update_item' => __( 'Update Event', 'joinweb' ), 'view_item' => __( 'View Item', 'joinweb' ), 'separate_items_with_commas' => __( 'Separate Events with commas', 'joinweb' ), 'add_or_remove_items' => __( 'Add or remove Events', 'joinweb' ), 'choose_from_most_used' => __( 'Choose from the most used Events', 'joinweb' ), 'popular_items' => __( 'Popular Items', 'joinweb' ), 'search_items' => __( 'Search Events', 'joinweb' ), 'not_found' => __( 'Not Found', 'joinweb' ), 'no_terms' => __( 'No items', 'joinweb' ), 'items_list' => __( 'Items list', 'joinweb' ), 'items_list_navigation' => __( 'Items list navigation', 'joinweb' ), ); $rewrite = array( 'slug' => 'tedx_events', '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' => true, 'query_var' => 'tedx_events', 'rewrite' => $rewrite, ); register_taxonomy( 'tedx_event', array( 'speaker' ), $args ); } add_action( 'init', 'jw_custom_taxonomy', 0 ); }