Pass custom value to custom taxonomy

have you tried building your tag array into a variable and passing that as a parameter to set_post_terms? function add_author_taxonomy( $post_id ) { global $wpdb; if(!wp_is_post_revision($post_ID)) { $my_tags = get_post_meta($post_id, ‘user_submit_customauthor’, true); wp_set_post_terms( $post_id, $my_tags, ‘author’, true ); } } add_action(‘publish_page’, ‘add_author_taxonomy’); add_action(‘publish_post’, ‘add_author_taxonomy’) ;

store an array of all the terms existing

Not sure what the problem is, you’re practically there! You can use your code anywhere (as long as it’s after the init hook), not just in template files. $terms = get_terms( ‘MYTAXONOMY’ ); $term_slugs = wp_list_pluck( $terms, ‘slug’ ); wp_list_pluck() is a very cool little function that will pluck a field out of an array … Read more