-
Notifications
You must be signed in to change notification settings - Fork 0
/
tags.php
29 lines (26 loc) · 629 Bytes
/
tags.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
# define custom taxonomies
function cv_tags_init() {
register_taxonomy(
'cv_tag',
array('cv_project'),
array(
'hierarchical' => false,
'show_ui' => true,
'show_in_rest' => true, # seems necessary to show in interface
'description' => 'Tags associated with life projects',
'label' => __( 'tags' ),
'public' => true,
'rewrite' => ['slug'=>'CVtag'],
'capabilities' => array('manage_terms','edit_terms'),
'label' => 'Tag',
'labels' => array(
'name' => 'Tags',
'singular_name' => 'Tag',
'add_new_item' => 'Add new tag'
),
)
);
}
add_action( 'init', 'cv_tags_init' );
?>