Getting values of a custom taxonomy dropdown
get_user_by() receives user data not taxonomy terms. Since you are not dealing with real userdata you’ll have to use get_term_by() to receive the term name. You would use it like this: $username = get_term_by( ‘id’, (int) $_POST[‘alt_comment_user’], ‘custom_authors’ ); Fixed code: function taxonomy_dropdown() { wp_dropdown_categories( array( ‘name’ => ‘alt_comment_user’, ‘taxonomy’ => ‘custom_authors’, ‘hide_empty’ => false … Read more