Taxonomy
Last updated
Was this helpful?
Last updated
Was this helpful?
/**
* @param {string} [label] - Component label.
* @param {string} [help] - Component description.
* @param {string} taxonomy - The taxonomy name.
* @param {string} metaKey - Registered meta key from register_post_meta().
*/
register_post_meta( 'post_type_name', 'test_category', array(
'type' => 'string',
'default' => '',
'single' => true,
'show_in_rest' => true,
) );
import {
TwebMetaTaxonomyControl,
} from '@tigriweb/components/meta';
<TwebMetaTaxonomyControl
label={ __('Category Label', 'your-theme-name') }
help={ __('Category Description', 'your-theme-name') }
taxonomy="category"
metaKey="test_category"
/>