Save selected item from dropdown menu in a meta box as a metadata value for a custom post type
$myterms = get_terms($taxonomies, $args); returns an array of term objects. Use $term->term_id as option value … “<option value=”$term->term_id”>”. esc_html( $term_name ) . “</option>” … and store that ID, not the name. Names can change, the IDs will stay the same – unless someone deletes a term and creates a new one with the same name. … Read more