Setting category for post as default
I just recently did this with a custom post type and custom taxonomy with the following code. function cpt_assign_term($post_id) { $current_post = get_post( $post_id ); // Only apply to new posts. if ( $current_post->post_date == $current_post->post_modified ) { wp_set_object_terms( $post_id, ‘default-term_name-or-id’, ‘category’, true ); } } add_action( ‘save_post_{your-post-type}’, ‘cpt_assign_term’ ); https://codex.wordpress.org/Function_Reference/wp_set_object_terms