WordPress 原创插件 国人习惯、简约实用、容易上手【点击了解】
这里我们可以在调用Tag的 the_tags('', ', ', ''); 替换成下面的代码即可。
$posttags = get_the_tags();
$count=0;
if($posttags) {
foreach($posttags as $tag) {
$count++;
if($count<3){
echo '<a href="' . get_tag_link( $tag ) . '" rel="tag" target="_blank">' . $tag->name . '</a> ';
}
}
}