Custom Taxonomy from public API created unchecked using wp_set_object_terms
-
I’m a bit lost on how I can achieve what I need to do.
So far I have, used php to json a public API URL, and created custom post types, and created custom taxonomy terms and used wp_set_object_terms to populate the custom taxonomy with items from an array from the API.
My issue is that all the terms added are added unchecked. I can of course go through each custom post type post and apply the checks on the taxonomy terms i want, but i want to do this through php if possible, as i am creating many custom post type pages with data from the API.
I’ve looked through google, but can’t find anything so far.
I would have through that there would be a way, using php, to take the terms that have already been generated, or that are being generated from wp_set_object_terms using the array, and asking the custom post type custom taxonomy terms that are within the array to change from unchecked to checked for the custom post type post?
The topic ‘Custom Taxonomy from public API created unchecked using wp_set_object_terms’ is closed to new replies.