WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As you know, there is a metabox that suggests tags as you type to input box. Is anyone knows how this function gets the tag's ID (term_id) which is selected? I have looked at some of the core files but it seems only the tag name is retrieved and the ajax response returns only the name, no sign of id.

But it's just impossible as the tag is updated by the tag's ID but not it's name upon submitting or updating the post

The core files i've looked at:

share|improve this question
up vote 1 down vote accepted

It just passes the tag names to wp_update_post(), which eventually calls wp_set_post_tags(), which eventually converts the names to term_ids, using term_exists().

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.