Retrieve the link to the tag.
Signature
get_tag_link( $tag )
- tag
- (int|object) Tag ID or object.
Return
(string) Link on success, empty string if tag does not exist.
Source
function get_tag_link( $tag ) {
if ( ! is_object( $tag ) )
$tag = (int) $tag;
$tag = get_term_link( $tag, 'post_tag' );
if ( is_wp_error( $tag ) )
return '';
return $tag;
}
WP Trac GitHub Bitbucket
Link here
-
URL
http://queryposts.com/function/get_tag_link/ -
HTML
<a href='http://queryposts.com/function/get_tag_link/'>get_tag_link()</a> -
Markdown
[get_tag_link()](http://queryposts.com/function/get_tag_link/) -
BBCode
[url=http://queryposts.com/function/get_tag_link/]get_tag_link()[/url]