Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

wordpress set category front end

$postCats = trim( $_POST['post-cats']; )
$postCats = explode( ',', $postCats );

wp_set_object_terms( $post_id, array( $postCats[0], $postCats[1], $postCats[2], $postCats[3], $postCats[4] ), 'category' );
Source by wordpress.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #wordpress #set #category #front
ADD COMMENT
Topic
Name
4+6 =