您的当前位置:首页 > 知识博客 > wordpress建站

WordPress获取Tag链接标签:get_tag_link

时间:2024-03-15

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()


欢迎咨询/Welcome to inquire
tel/vx:18842938855
qq:1685522781
email:1685522781@qq.com

Copyright © 2019-2024 mysql.hk


Whatsapp
Powered by RRZCMS