How can I add a new Tag without an post-id?

wp_set_post_tags() needs a Post-Id, but a client want import Post-Tags without assignment to a post (for choosing later into the posts).


Ok, i have found the solution. wp_insert_term() do this job perfectly ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.