ek_thematic_taxonomy
if ( ! function_exists( 'ek_thematic_taxonomy' ) ) {
// Register Custom Taxonomy
function ek_thematic_taxonomy() {
$labels = array(
'name' => _x( 'Thematics', 'Taxonomy General Name', 'eklo' ),
'singular_name' => _x( 'Thematic', 'Taxonomy Singular Name', 'eklo' ),
'menu_name' => __( 'Thematic', 'eklo' ),
'all_items' => __( 'All thematic', 'eklo' ),
'parent_item' => __( 'Parent thematic', 'eklo' ),
'parent_item_colon' => __( 'Parent thematic:', 'eklo' ),
'new_item_name' => __( 'New thematic name', 'eklo' ),
'add_new_item' => __( 'Add new thematic', 'eklo' ),
'edit_item' => __( 'Edit thematic', 'eklo' ),
'update_item' => __( 'Update thematic', 'eklo' ),
'view_item' => __( 'View thematic', 'eklo' ),
'separate_items_with_commas' => __( 'Separate thematics with commas', 'eklo' ),
'add_or_remove_items' => __( 'Add or remove thematics', 'eklo' ),
'choose_from_most_used' => __( 'Choose from the most used', 'eklo' ),
'popular_items' => __( 'Popular thematics', 'eklo' ),
'search_items' => __( 'Search thematics', 'eklo' ),
'not_found' => __( 'Not Found', 'eklo' ),
'no_terms' => __( 'No thematics', 'eklo' ),
'items_list' => __( 'Thematics list', 'eklo' ),
'items_list_navigation' => __( 'Thematics list navigation', 'eklo' ),
);
$rewrite = array(
'slug' => 'thematics',
'with_front' => true,
'hierarchical' => false,
);
$capabilities = array(
'manage_terms' => 'manage_thematics',
'edit_terms' => 'manage_thematics',
'delete_terms' => 'manage_thematics',
'assign_terms' => 'edit_faqs',
);
$args = array(
'labels' => $labels,
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => true,
'query_var' => 'thematics',
'rewrite' => $rewrite,
'capabilities' => $capabilities,
'update_count_callback' => 'ek_thematic_count',
'show_in_rest' => true,
);
register_taxonomy( 'thematic', array( 'faq' ), $args );
}
add_action( 'init', 'ek_thematic_taxonomy', 0 );
}