Category Icons
Category Icons is a WordPress plugin that makes it possible to assign images/icons to categories.
Quick Links:
- Plugin Home: DevCorner
- Download URL: Cateogry Icons Download Page
- Author URL: DevCorner
Features
The plugin implements the following features:
- User can assign or clear icons to categories through admin panel.
- Directory and URL for icons can be specified thorugh admin panel. Upload options can be used instead.
- A template tag (function) is exposed to include category icon into templates.
- Plugint installs itself, by creating a database table and setting default option values, when activated.
Compatibility
- Category Icons 1.5 is WordPress 2.0 compatible.
- Category Icons 1.0 is WordPress 1.5 compatible.
Download
Do download Category Icons plugin for WordPress, please go to the releases the Category Icons Releases page and select the appropriate version for download:
Installation
Copy the category_icons.php file into your wp_content/plugins directory. Activate the plugin from Plugins admin menu.
Once the plugin is activated it creates a "Cat Icons" panel under "Options". This will allow you to manage category icons.
Usage
The plugin exposes the *get_cat_icon* function as WordPress template tag to be used in WordPress templates. It takes following options, passed in WordPress template tags style:
- fit_width - maximum width of image. -1 for do not care. Default is -1
- fit_height - maximum height of image. -1 for do not care. Default is -1
- exapnd - Expand image to fit the rectangle if smaller? Default "false".
- cat - Category ID. Default is current category.
- small - Is this a small icon? Default "false"
Examples
This example will insert the icon associated with the current category:
<?php get_cat_icon(); ?>
This example inserts icon for the category with ID '5'. The image is fitted withing rectangle 100x100. If the image is smaller than desired, it is expanded.:
<?php get_cat_icon('cat=5&fit_width=100&height=100&expand=true'); ?>
