I have a post ID and I’m just trying to find a function ( I was thinking of something similar to wp_update_post() ) where I can just pass a post ID and maybe a category ID or slug and have it associate the post to the category. Does that exist or have you seen a plugin doing that where I can peek at what they did?
Leave a Reply
You must be logged in to post a comment.
wp_set_object_terms()
is native function that assigns term from taxonomy to post.