jtsternberg/cmb2-term-select

Special CMB2 Field that allows users to define an autocomplete text field for terms

v0.1.0 2016-05-30 06:08 UTC

This package is not auto-updated.

Last update: 2024-12-21 20:14:13 UTC


README

Special CMB2 Field that allows users to define an autocomplete text field for terms.

Example

$cmb->add_field( array(
	'name'     => 'Select Category',
	'id'       => 'category_data',
	'desc'     => 'Type the name of the term and select from the options',
	'type'     => 'term_select',
	'taxonomy' => 'category',
	// 'apply_term' => false, // If set to false, saves the term to meta instead of setting term on the object.
	// 'attributes' => array(
	// 	'data-min-length' => 2, // Override minimum length
	// 	'data-delay'      => 100, // Override delay
	// ),
) );