如何将wordpress post标签显示为文本而不是链接?我尝试过the_tags();功能,我得到输出作为链接 . 我是新的wordpress . 谁能给我解决方案?
一种选择是遍历标签并检索其名称“
$posttags = get_the_tags(); if ($posttags) { foreach($posttags as $tag) { echo $tag->name . ' '; } }
[代码来自wordpress dokumentation on get_the_tags(您也可以使用the_tags来检索标记并循环显示那些here)]
1 回答
一种选择是遍历标签并检索其名称“
[代码来自wordpress dokumentation on get_the_tags(您也可以使用the_tags来检索标记并循环显示那些here)]