公告
财富商城
积分规则
提问
发文
2019-04-30 09:53发布
聊天终结者
I have a question.
How can I count number of posts of a tag ?
Example : Tag photos (67)
Thanks
See here.
Use the code below:
$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;
最多设置5个标签!
See here.
Use the code below: