Category Count plugin for WordPress

It’s official I have made my first WordPress plugin. As far as plugins go, however, it’s quite meager. The plugin contains one functionality, it counts the number of categories in which there are published posts. You can see it in action in the sidebar of my archives.

The template function the plugin provides is teb_category_count(display) which accepts a single argument.

display
(boolean) sets whether the function should display the number of categories, or if it should return it.

  • true (default)
  • false

Disclaimer: This plugin has been tested to work on my test blog and here, but it could break in real life. If you see any problems with my implementation be sure to let me know.

Leave a Reply