这里我们可以在调用Tag的 the_tags(”, ‘, ‘, ”); 替换成下面的代码即可。
$posttags = get_the_tags();
$count=0;
if($posttags) {
foreach($posttags as $tag) {
$count++;
if($count<3){
echo '' . $tag->name . ' ';
}
}
}
这里我们可以在调用Tag的 the_tags(”, ‘, ‘, ”); 替换成下面的代码即可。
$posttags = get_the_tags();
$count=0;
if($posttags) {
foreach($posttags as $tag) {
$count++;
if($count<3){
echo '' . $tag->name . ' ';
}
}
}
