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

I'm trying to pull up a custom page which lists all tags used in my blog that have a description, to build up a glossary.

It all works great but i would also like to display an "edit tag" link for each tag, only visible to admins. The built-in edit_tag_link() function is supposed to do just that, as far as i understand the codex, but the edit link does not show up. What is wrong with my code?

$tags = get_tags();
foreach ($tags as $tag){
            $tag_link = get_tag_link($tag->term_id);
    echo "<li><a class='content-link' href='{$tag_link}' title='{$tag->name} Tag' class='{$tag->slug}'><h3>{$tag->name}</h3>
    <pclass='abstract'>{$tag->description}</p></a> ".edit_tag_link('edit tag','<p>','</p>',$tag)."</li>";

share|improve this question
up vote 1 down vote accepted

Turns out the edit_term_link() function works fine for that.

        edit_term_link('edit tag','<p>','</p>',$tag);
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.