As I was working on this plugin, I kept thinking: I really hope that this is a core function that I just not finding. This plugin does one simple thing. It returns the number of entries associated with a given category.
This is how it works:
{exp:catcount cat_id="33" status="open|close"}
This would output a number, such as “12” where you place it.
It can also work nested within the exp:weblog:categories like so:
{exp:weblog:categories weblog="{current-weblog}"}
<li>{category_name}({exp:catcount cat_id="{category_id}"})</li>
{/exp:weblog:categories}
Please let me know if there is a core function that does this, and if not… enjoy ![]()
Edit Feb. 19, 2010
1.1 - Added status parameter (Jan. 7, 2009)
2.0 - EE2 compatible
