Function : put_cat_icons()
March 12, 2008 by submarine
This function ”iconizes” your categories list in the sidebar.
put_cat_icons(list [,get_cat_icon_parameters])
- list : this is a WordPress category list : wp_list_categories(). You MUST ADD echo=0 to the wp_list_categories parameters.
- get_cat_icon_parameters : (optional) these are the get_cat_icon() parameters, separated by a ‘&’.
There’s an exception : for put_cat_icons(), the parameter ‘link’ is always set to false.
Example :
write the following code in sidebar.php to have icon next to the category name for which you uploaded an icon (see that plugin to upload things). You can give any parameters to wp_list_categories, but you MUST ADD echo=0, in order to process the list :
![]()
In the parameters, if you put : ‘icons_only=true’, then only the icons will be displayed in the sidebar, instead of the icon AND the category name.
![]()
If you use the widget, just put icons_only=true in the parameters.
[...] the put_cat_icons() function. Example [...]