|
|
@@ -54,9 +54,6 @@ class PostType {
|
|
54
|
54
|
'show_in_rest' => true,
|
|
55
|
55
|
'publicly_queryable' => false
|
|
56
|
56
|
];
|
|
57
|
|
-
|
|
58
|
|
- if( $this->post_type == 'artist' ) { $args['taxonomies'] = ['category']; }
|
|
59
|
|
- if( $this->post_type == 'event' ) { $args['taxonomies'] = ['type']; }
|
|
60
|
57
|
|
|
61
|
58
|
register_post_type( $this->post_type, $args );
|
|
62
|
59
|
}
|
|
|
@@ -154,3 +151,9 @@ function cmb2_artist_sort_metaboxes() {
|
|
154
|
151
|
'type' => 'text'
|
|
155
|
152
|
) );
|
|
156
|
153
|
}
|
|
|
154
|
+
|
|
|
155
|
+function create_materials_taxonomy() {
|
|
|
156
|
+ $post_types_that_show_materials = [ 'artist' ];
|
|
|
157
|
+ register_taxonomy("material", $post_types_that_show_materials, [ "label" => "Materials"]);
|
|
|
158
|
+}
|
|
|
159
|
+add_action('init', 'create_materials_taxonomy');
|