Script to add tag to post
-
I am writing a script to automatically add a tag to a post by running it from the single post page itself. That is, at the bottom of the post, there is a form to select from a short list of tags, and it submits the tag id and the post id by POST to the script.
I want to be sure that the following actions are all that are needed:
1. Add a row to wp-term-relationships with the post id and the tag id.
2. Add 1 to the count in wp_term_taxonomy for the tag id.
C’est tout?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Script to add tag to post’ is closed to new replies.