Forums

Execute function when tag created in "post creating" screen (1 post)

  1. burnsito
    Member
    Posted 7 months ago #

    Hi :)

    I need to edit a database everytime a Tag is created. I added a function like this:

    add_action( 'created_term', 'update_urls_tags' );

    **Resuming, update_urls_tags() read all the tags from wp_terms table and update another table with the new ones.

    But this only executes when you create a Tag from the "Post tags" screen. If you create a post, and from the "create post" screen, add the tags, it doesn't execute the function.

    I tried using:

    add_action( 'publish_post', 'update_urls_tags' );

    But with that, the function executes before the tag is inserted in "wp_terms", so my function can't do the job.

    Any ideas?

    Thank you very much!!!

Reply

You must log in to post.

About this Topic