Nuxy
Search…
⌃K

Adding Taxonomy Options

add_filter('stm_wpcfto_term_meta_fields', function ($fields) {
$fields['category'] = array(
'course_text' => array(
'label' => esc_html__('Category Text', 'my-domain'),
'type' => 'text',
),
'course_image' => array(
'label' => esc_html__('Category Image', 'my-domain'),
'type' => 'image',
),
'course_icon' => array(
'label' => esc_html__('Category Icon', 'my-domain'),
'type' => 'icon',
),
'course_color' => array(
'label' => esc_html__('Category Color', 'my-domain'),
'type' => 'color',
),
);
return $fields;
}, 1000, 1);
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!