Widget

After activating the plugin, a new widget is available in your widget page. It presents a number of options that allow you to exclude some categories, show or hide the RSS link, the number of posts in the categories, ...

Template tag

You can as well us the plugin directly in your theme. You need to include the following code somewhere in your PHP files (for instance in the sidebar):

enh_cats_list_categories(array(
'show_count' => 1,
'show_rss' => 1,
'hide_empty' => 0,
'button_color' => '#00CC00',
'contract_children' => 0
));

As you can see, the function takes only one parameter which is an array of options. The available options are:

  • show_count: show the number of posts next to the category.
  • show_rss: show a link to the RSS feed of the category.
  • hide_empty: hide categories that don't have any posts.
  • button_color: the color of the expand/contract button.
  • contract_children: if set to 1, the children categories will be hidden when the page is displayed. If set to 0, all the categories are shown first.
  • expand_text: the text of the expand button.
  • leaf_text: the text that appears next to a category without children.
  • contract_text: the text of the contract button.
  • expand_image: the full URL of the image of the expand button.
  • leaf_image: the full URL of the image that appears next to a category without children.
  • contract_image: the full URL of the image of the contract button.
  • is_button_after: if set to 1, the button to expand/contract the category will be placed after it.
  • orderby: changes the sort criteria. Can be set to 'name' or 'ID', or 'order' if the My Category Order plugin is installed.
  • order: set to ASC or DESC to change sort order.

The plugin is also compatible with the Exec-PHP plugin. You can execute that same code inside one of your blog's static pages.