我使用的是这里的第一个示例:http://codex.wordpress.org/Function_Reference/get_the_tags 但什么都没有出现。
我的函数中没有关于get\\u the\\u标记的内容。php。。。我也不知道该放什么(对不起,wordpress的业余爱好者)
只是想显示与帖子相关的标签。
有人能帮忙吗?
我使用的是这里的第一个示例:http://codex.wordpress.org/Function_Reference/get_the_tags 但什么都没有出现。
我的函数中没有关于get\\u the\\u标记的内容。php。。。我也不知道该放什么(对不起,wordpress的业余爱好者)
只是想显示与帖子相关的标签。
有人能帮忙吗?
Here you go,
global $post;
$posttags = get_the_tags();
if ($posttags)
{
foreach($posttags as $tag) {
$tagu = $tag->name;
echo $tagu
}
}
我想在一个小部件中显示帖子的标签。我知道这很难,因为这是在循环之外,但已经完成了吗,有没有可用的?