2011-03-10 6 views

답변

5

를 사용하여 아래의 코드 :

$taxonomy = "category"; // can be category, post_tag, or custom taxonomy name 

// Using Term Slug 
$term_slug = 'some-category'; 
$term = get_term_by('slug', $term_slug, $taxonomy); 

// Fetch the count 
echo $term->count; 
관련 문제