Wordpress setting multiple object terms -


i'm trying figure out how set multiple value wp_set_object_terms() wordpress function.

i tried use array:

$array =  array(102, 59); wp_set_object_terms ($property_id, $array, 'property-city'); 

but sets last value "59".

you might want set append parameter true, if want add terms.

wp_set_object_terms( $object_id, $terms, $taxonomy, $append ); 

refer to: https://codex.wordpress.org/function_reference/wp_set_object_terms


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -