首页>文档>主题开发>通过文章ID获取文章的标签

通过文章ID获取文章的标签

示例代码

<?php

$post_tags = get_the_tags( 1502 );

foreach( $post_tags as $post_tag ) {
echo '<li><a href="' . get_tag_link( $post_tag ) . '">' . $post_tag->name . '</a></li>';
}

?>

相关链接:

get_the_tags

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索