Support » Plugins and Hacks » programming: how to append tag to post with some criteria?

  • hi

    I am writing plugin. I want to add tag “video” to post, when it is published or edited if this post has some special value in Custom Field.

    I know how to check if post has this custom field.
    I know how to make some action when post is published: add_action(‘publish_post’…
    but i don’t know how to add tag ‘video’ in this action. what should be in function?

  • The topic ‘programming: how to append tag to post with some criteria?’ is closed to new replies.