Created
June 6, 2016 05:44
-
-
Save nayemDevs/af3a206d742cea1e3be9ba4c16fd5b97 to your computer and use it in GitHub Desktop.
Now, after adding these code you have to add a hidden field into your form. You have to insert the meta key name "wpuf_hidden_cat" and the value will be your category ID.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'wpuf_add_post_after_insert', function( $post_id ) { | |
wp_set_post_terms( $post_id, get_post_meta( $post_id, 'wpuf_hidden_cat', true ), 'your taxonomies name' ); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment