Title: Count Posts in a Category, Tag, or Custom Taxonomy
Author: Luke Mlsna
Published: <strong>2011년 12월 6일</strong>
Last modified: 2013년 1월 1일

---

플러그인 검색

이 플러그인은 **최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다**. 워드프레스의
좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 
있을 수 있습니다.

![](https://s.w.org/plugins/geopattern-icon/count-posts-in-a-category.svg)

# Count Posts in a Category, Tag, or Custom Taxonomy

 작성자: [Luke Mlsna](https://profiles.wordpress.org/bitacre/)

[다운로드](https://downloads.wordpress.org/plugin/count-posts-in-a-category.3.1.zip)

 * [세부사항](https://ko.wordpress.org/plugins/count-posts-in-a-category/#description)
 * [평가](https://ko.wordpress.org/plugins/count-posts-in-a-category/#reviews)
 *  [설치](https://ko.wordpress.org/plugins/count-posts-in-a-category/#installation)
 * [개발](https://ko.wordpress.org/plugins/count-posts-in-a-category/#developers)

 [지원](https://wordpress.org/support/plugin/count-posts-in-a-category/)

## 설명

This plugin allows you to dynamically return the number of posts in a particular
category, tag, or custom taxonomy. Inserting `[cat_count value="category-slug"]`
in a post or page, or `<?php do_shortcode('cat_count slug="category-slug" '); ?>`
anywhere in WordPress’ code will return the number of posts in that particular category.

Useful for creating dynamic table of contents pages, keeping track of post stats,
general bragging, or any place where keeping a running tally might be desirable.

### Readme Generator

 * This plugin’s readme.txt file was generated by the [bitacre Readme Generator](http://shinraholdings.com/project/readme-gen)
   for WordPress Plugins.

### Support

 * [Plugin Homepage](http://shinraholdings.com/plugins/count-posts-in-a-category)
 * [plugins@shinraholdings.com](https://ko.wordpress.org/plugins/count-posts-in-a-category/plugins@shinraholdings.com?output_format=md)

### Donations

[Donations](http://shinraholdings.com/donate) are graciously accepted to support
the continued development and maintenance of this and other plugins. We currently
accept Paypal and kind words.

## 스크린샷

[⌊Some examples of what you can do with the plugin (in the body of a post).⌉⌊Some
examples of what you can do with the plugin (in the body of a post).⌉[

Some examples of what you can do with the plugin (in the body of a post).

[⌊The code that created the output in the picture above.⌉⌊The code that created 
the output in the picture above.⌉[

The code that created the output in the picture above.

## 설치

 1. Download the latest zip file and extract the `post-count-per-category` directory.
 2. Upload this directory inside your `/wp-content/plugins/` directory.
 3. Activate ‘Post Count per Category’ on the ‘Plugins’ menu in WordPress.
 4. Insert in a post or page: `[cat_count slug="category-slug"]` to count a category,`[
    tag_count slug="tag-slug"]` to count a tag, or [tax_count tax=”taxonomy-name” slug
    =”taxonomy-slug”] to count a custom taxonomy. (Replacing the slugs in quotes with
    an acutal slug name) to return the number of posts in that category, tag or custom
    taxonomy.

## FAQ

  How do I add it into my posts?

You must insert the shortcode in location where you want to count to appear: (always
replacing category-slug with an acutal slug name)

For categories:
 * `[cat_count slug="category-slug"]`

or for a tag:
 * `[tag_count slug="tag-slug"]`

or for a custom taxonomy:
 * `[tax_count tax="taxonomy-name" slug="taxonomy-slug"]`

The legacy shortcode assumes you are giving it slugs, but it can also accept category
names or IDs:

 * `[ccp type="name" cat="Category Name"]`
 * `[ccp type="id" cat="27"]`

or for a tag:
 * `[ccp type="name" tag="Tag Name"]` * `[ccp type="id" tag="28"]`

With the new shortcodes, you can specify slug=””, id=””, or name=”” directly. If
more than one is given, posts are selected in that order.

  Can I add the count multiple terms?

 * As of version 3.1… Yes! You can specify more than 1 `ID` or `slug` by separating
   the values with commas. You have to use either `ID` or `slug`, not a combination
   of both. Also, you cannot use the `name` attribute (since a name may ostensibly
   contain commas naturally, unlike a slug or ID).
 * So, for example, if you had 3 categories with the slugs “cat-1”, “cat-2”, and“
   cat-3” each with 10 posts, you could get the count for all three (it would return“
   30”) using this shortcode:
 * [cat_count slug=”cat-1,cat-2,cat-3″]
 * Thanks to [Jack Brand](http://shinraholdings.com/plugins/count-posts-in-a-category/#comment-368)
   for this excellent suggestion.

  It keeps returning 0 posts, why?

Make sure you’re using the correct slug, sometimes they are different from the actual
category name and capitalization matters. You can view them by clicking on the Categories
link under Posts.

Also don’t literally copy “category-slug,” you need to put the category you want
counted there, that’s just a place holder. So to count the number of posts in a 
category called ‘Book Reviews’ with a slug name of ‘book-reviews’ you would insert`[
cat_count slug="book-reviews"]`.

  Why are there 2 kinds of shortcodes

The shortcodes without underscores are legacy shortcodes, I left them in the plugin
so stuff won’t break, but you should use the new shortcodes if possible. The legacy
shortcodes include:
 [ccp] [catcountposts] [countposts] [countpost] [postsincat][
postincat]

The legacy shortcodes only work for categories and tags, and they all follow the
format `[ccp type="slug/id/name" cat="category-slug/id/name" tag="tag-slug/id/name"]`

The NEW shortcodes all have underscores, and follow a slightly different format.
There are 3 seperate shortcodes:
 For **Categories**: * `[cat_count slug="cat-slug"]`
or `[cat_count id="45"]` or `[cat_count name="Category Name"]`

For **Tags**:
 * `[tag_count {slug="tag-slug"} {id="45"} {name="tag name"} ]`

For **Custom Taxonomies**:
 * `[tax_count tax="custom-tax-type" {slug="tax-slug"}{
id="99"} {name="Taxonomy Item Name"} ]`

You only need to specify 1 of the following: `slug=""`, `id=""`, or `name=""`. If
you specify more than one, the plugin will ignore the other attributes in the order
of slug > id > name.

You also need to specify the `tax="custom-tax-type"` for the `[tax_count]` shortcode.
This is so the plugin knows which custom taxonomy to count.

  Can you add this feature I just thought of?

Can I? Yes. Will I? Yes, if I think it would be a helpful addition. I’m trying to
keep things clean and simple, but there’s always room for improvement, so let me
know if you think a feature is lacking!

## 후기

![](https://secure.gravatar.com/avatar/b382bcf0dcb8789f25830744642416830ada9527ee26aaee04a00333703250e1?
s=60&d=retro&r=g)

### 󠀁[Still working great](https://wordpress.org/support/topic/still-working-great-2/)󠁿

 [Mladen Gradev](https://profiles.wordpress.org/joe8104/) 2017년 6월 30일

Last updated 4 years ago and still working great.

![](https://secure.gravatar.com/avatar/81fc9adda2890d3af4d67ca9dc4f74c904791578780acb5560c34ae27763b655?
s=60&d=retro&r=g)

### 󠀁[Great Plugin but need improvement](https://wordpress.org/support/topic/great-plugin-but-need-improvement/)󠁿

 [andhiirawan](https://profiles.wordpress.org/andhiirawan/) 2016년 9월 3일

Thank you for this wonderful plugin. I’ve tried and used it. I’ve been able to show
total post, but overall (example : Showing 10 Products). Screenshot : https://i.
imgur.com/mnMjFI6.png How to display the total post per page? Suppose “Showing 5
of 10 Products”. Like this screenshot : https://i.imgur.com/pDFqB5Y.png Thanks

 [ 모든 2 평가 읽기 ](https://wordpress.org/support/plugin/count-posts-in-a-category/reviews/)

## 기여자 & 개발자

“Count Posts in a Category, Tag, or Custom Taxonomy”(은)는 오픈 소스 소프트웨어입니다.
다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

 *   [ Luke Mlsna ](https://profiles.wordpress.org/bitacre/)

[자국어로 “Count Posts in a Category, Tag, or Custom Taxonomy”(을)를 번역하세요.](https://translate.wordpress.org/projects/wp-plugins/count-posts-in-a-category)

### 개발에 관심이 있으십니까?

[코드 탐색하기](https://plugins.trac.wordpress.org/browser/count-posts-in-a-category/)
는, [SVN 저장소](https://plugins.svn.wordpress.org/count-posts-in-a-category/)를
확인하시거나, [개발 기록](https://plugins.trac.wordpress.org/log/count-posts-in-a-category/)
을 [RSS](https://plugins.trac.wordpress.org/log/count-posts-in-a-category/?limit=100&mode=stop_on_copy&format=rss)
로 구독하세요.

## 변경이력

#### 3.1

 * Will now add counts of comma separated IDs or slugs together.
 * Changed the name again.

#### 3.0

 * Will now count categories, tag, and custom taxonomies.
 * Added additional (easier) shortcodes.

#### 2.1

 * Will do tags as well as categories now.

#### 2.0

 * Added support for category name & ID input.
 * Cleaned & commented up code considerably.

#### 1.0

 * First released version.
 * There may still be bugs, but I can’t find any.

## 기초

 *  버전 **3.1**
 *  최근 업데이트: **14년 전**
 *  활성화된 설치 **100+**
 *  워드프레스 버전 ** 2.8 또는 그 이상 **
 *  다음까지 시험됨: **3.5.2**
 *  언어
 * [English (US)](https://wordpress.org/plugins/count-posts-in-a-category/)
 * 태그:
 * [category](https://ko.wordpress.org/plugins/tags/category/)[count](https://ko.wordpress.org/plugins/tags/count/)
   [posts](https://ko.wordpress.org/plugins/tags/posts/)[tag](https://ko.wordpress.org/plugins/tags/tag/)
   [template](https://ko.wordpress.org/plugins/tags/template/)
 *  [고급 보기](https://ko.wordpress.org/plugins/count-posts-in-a-category/advanced/)

## 평점

 별 5점 만점에 5점.

 *  [  2/5-별점 후기     ](https://wordpress.org/support/plugin/count-posts-in-a-category/reviews/?filter=5)
 *  [  0/4-별점 후기     ](https://wordpress.org/support/plugin/count-posts-in-a-category/reviews/?filter=4)
 *  [  0/3-별점 후기     ](https://wordpress.org/support/plugin/count-posts-in-a-category/reviews/?filter=3)
 *  [  0/2-별점 후기     ](https://wordpress.org/support/plugin/count-posts-in-a-category/reviews/?filter=2)
 *  [  0/1-별점 후기     ](https://wordpress.org/support/plugin/count-posts-in-a-category/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/count-posts-in-a-category/reviews/#new-post)

[모든  리뷰 보기](https://wordpress.org/support/plugin/count-posts-in-a-category/reviews/)

## 기여자

 *   [ Luke Mlsna ](https://profiles.wordpress.org/bitacre/)

## 지원

할 말 있으신가요? 도움이 필요하신가요?

 [지원 포럼 보기](https://wordpress.org/support/plugin/count-posts-in-a-category/)

## 기부

이 플러그인이 발전하도록 도우시겠습니까?

 [ 이 플러그인에 기부하기 ](http://shinraholdings.com/donate)