Answers for "wordpress set category front end"

PHP
0

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' );
Posted by: Guest on July-08-2020

Code answers related to "wordpress set category front end"

Browse Popular Code Answers by Language