2011-03-10 20 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; 
関連する問題