WordPress模板标签get_tag_link用于获取标签链接,该函数需要传递标签ID,以返回指定ID标签的链接。
get_tag_link( integer $tag )
函数参数
$tag
整数型,默认为空
指定标签ID,将返回该标签的链接。
函数使用示例
<a href="<?php echo get_tag_link($tag_id); ?>">标签名称</a>
扩展阅读
get_tag_link()函数位于:wp-includes/category-template.php
- get_tag()
- get_tags()
- get_the_tag_list()
- get_the_tags()
- is_tag()
- the_tags()
- single_tag_title()
- tag_description()
- wp_generate_tag_cloud()
- wp_tag_cloud()