Hello,
I was wondering if there is a function that will add a post (via post id) into specific categories (custom taxonomies in my case). I have been looking around for the function that does it but could not find it.
Thanks
Hello,
I was wondering if there is a function that will add a post (via post id) into specific categories (custom taxonomies in my case). I have been looking around for the function that does it but could not find it.
Thanks
I figured out my problem. I found this function
wp_set_object_terms
it's used this way
wp_set_object_terms($postid,$cat_ids,$taxonomy);
$cat_ids has to be an array even if it's only one element, and you have to make sure that all the ids are integers.
Hope this helps someone else.
Very helpful for me!
I am working on my website (http://post.qp-x.com/) and I didn't know how to insert a category, but now everything works fine.
Thank you, fatalx!
This topic has been closed to new replies.