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
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
I pieced this together. Its pure database work, because I believe there is no quick function to delete a tag via ID, (but I am still not 100% certain).
Should help you get there:
Wordpress API: Add / Remove Tags on Posts
I found this function: wp_delete_term See if it helps you...
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.