2013-08-17 62 views

回答

0

嘗試使用這樣

<?php 
    $posttags = get_the_tags(); 
    $count=0; 
    if ($posttags) { 
    $output = ''; 
    foreach($posttags as $tag) { 
    $count++; 
    $output .= $tag->name . ' '; 
    if($count >4) break; //you can limit count here 
    } 
    } 
    echo $output; 
?>