wordpress set category front end

Solutions on MaxInterview for wordpress set category front end by the best coders in the world

showing results for - "wordpress set category front end"
Rashan
13 May 2018
1$postCats = trim( $_POST['post-cats']; )
2$postCats = explode( ',', $postCats );
3
4wp_set_object_terms( $post_id, array( $postCats[0], $postCats[1], $postCats[2], $postCats[3], $postCats[4] ), 'category' );