Nuxy
Search…
Adding Taxonomy Options
1
add_filter('stm_wpcfto_term_meta_fields', function ($fields) {
2
3
$fields['category'] = array(
4
'course_text' => array(
5
'label' => esc_html__('Category Text', 'my-domain'),
6
'type' => 'text',
7
),
8
'course_image' => array(
9
'label' => esc_html__('Category Image', 'my-domain'),
10
'type' => 'image',
11
),
12
'course_icon' => array(
13
'label' => esc_html__('Category Icon', 'my-domain'),
14
'type' => 'icon',
15
),
16
'course_color' => array(
17
'label' => esc_html__('Category Color', 'my-domain'),
18
'type' => 'color',
19
),
20
);
21
22
return $fields;
23
24
}, 1000, 1);
Copied!
Adding three fields to taxonomy. Key of array is a taxonomy slug (i.e.: 'category' - default post taxonomy)
Currently, taxonomy fields not builded on main framework. General fields not available!
Last modified 11mo ago
Copy link