I’ve got a function to add a tag by post ID, but now I would like to delete all the current tags for that ID before adding my new tags?
Does anyone know a built in function or wordpress query to do this?
-Hudson
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you can access the database directly (PhpMyAdmin), the quickest way is a SQL request.
Look at the database schema in the codex :
WARNING : obviously, modifying directly the database is dangerous. Be careful doing that.