Assign Taxonomy Based on Custom Field Value
/** * Programmatically assign taxonomy term by custom fields * * @param int $post_id */ function rd_assign_taxonomies($post_id) { if (get_post_type($post_id) == ‘vegetables’) { $terms = array(); // Here we’d check to see if the post has the specific fields, and if so add the IDs or slugs of the taxonomy terms to the $terms array … Read more