Taxonomy Term field

Select one or several terms from a specific taxonomy.

Internal name to use when adding field using PHP: taxonomyterm. Options: enabled_taxonomy” => “taxonomy-slug”.

Return

Returns an array with the ids of the selected terms as the value.s

If no terms are selected, an empty string is returned.

Extended Return Values

Example


// field slug is "taxonomytermExample"
$selected_terms = simple_fields_value('taxonomytermExample')
print_r($selected_terms);

Output:


Array
(
    [0] => 6
    [1] => 5
)

Leave a Reply