4

I have the tag ID, in integer format.

I want to convert this to the tag name. e.g. "cars"

How do I do this?

10

Use get_tag.

$tag = get_tag(2); // <-- your tag ID
echo $tag->name;
  • Thank you! Finally, a simple answer... everywhere else was trying to make things waaaaay too complicated. Just wanted exactly what you gave me - a way to plugin in a tag id and get its name. – exoboy Aug 11 '17 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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