2011-02-23 3 views

답변

0
$terms = get_terms("taxonomy"); 
       $count = count($terms); 
       if($count > 0) 
        { 
         echo '<ul>'; 
         foreach ($terms as $term) 
          { 
           echo '<li>'.$term->name.'</li>'; 
          } 
         echo '</ul>'; 
        } 
1

이 분류의 모든 용어 이름을 검색 :

$terms = get_terms('cars', array('fields' => 'names')); 
2

기괴한의 솔루션은 모든 조건을 반환 당신은 당신이 사용할 수있는 포스트 항목 당 조건을 표시해야하는 경우 :

$terms = wp_get_post_terms($post->ID, 'taxonomy-term', array("fields" => "names")); 
echo implode(', ',$terms); 

"taxonomy-term"이 올바른지 확인하십시오!