Codex

Function Reference/get tag link

Contents

Description

Returns the correct link url for a given Tag ID.

Usage

<a href="<?php echo get_tag_link($tag_id); ?>">tag name</a>

Parameters

tag_id 
(numeric) The Tag ID.

Return Values

(URL) 
(string) URL with a link to the tag.

Filters

Output from this function is filtered by the 'tag_link' filter. The first argument ($taglink) is the url as the function would normally output it, the second is the ID passed into the function.

apply_filters('tag_link', $taglink, $tag_id);

Source File

get_tag_link() is located in wp-includes/category-template.php.

Related

Tags: the_tags(), tag_description(), single_tag_title(), wp_tag_cloud(), wp_generate_tag_cloud(), get_tags(), get_the_tags(), get_the_tag_list(), get_tag_link()

get_the_terms(), get_term_link(), wp_get_object_terms()

See also index of Function Reference and index of Template Tags.
This article is marked as in need of editing. You can help Codex by editing it.