How to display category icons in the sidebar

To display the icons in the sidebar, you have 2 solutions :

1. Use the widget
Go to Appearance > Widgets and drag Category Icons Widget to the right. You can have multiple Category Icons widgets.

Image 71 How to display category icons in the sidebar

Category Icons Widget

Image 8 How to display category icons in the sidebar

Category Icons Widget Settings

2. Manually

In the sidebar.php page of your WordPress theme, you must use the put_cat_icons function.

UA:F [1.6.2_892]

What’s new in 2.0.7 ?

This is a recommended update !
  • Compatibility with My Category Order added.
  • I’ve added some links to Category Icons’s blog.
  • You can now sort a column of the category icons table by clicking its header. If you want to come back to the initial sort state, refresh the page.
  • The widget is now embedded in category-icons.php. The file category-icons_widget.php is not needed anymore, so you just have to activate only the plugin itself (the widget is automatically activated when you activate the plugin).
  • The check for the field priority is removed. May be it will avoid some issues with MySQL… 
  • The “Template Code” tab is renamed “Template Tags”…
Update :
  • Italian language updated by Gianni. Thank you Gianni !!!
  • Turkish language added by Selim Basak.

How to remove the border around icons

Sometimes, you don’t want to have a border around the icons. Try one of these solutions :

1. In the posts

In your template file, put the following code if you want no link and no border (most of the time, just ‘link=false’ do the trick) :

get_cat_icon('class=myicons&link=false');

with this added in your style.css file :

.myicons {
 border: 0px;
 border-style:none;
}

2. In the sidebar

Use the put_cat_icons() function. Example :

put_cat_icons(wp_list_categories('echo=0'),'class=myicons');

But you can also use the widget as an alternative, which is easier, but don’t forget to activate it. You’ll need to enter the following parameters in put_cat_icons() field :

class=myicons

with this in your style.css :

.myicons {
border: 0px;
}

3. Use the border parameter

Important ! If you use the border parameter, your page will not be valid XHTML Strict.

In your pages and posts :

get_cat_icon('border=false');

In the sidebar :

put_cat_icons(wp_list_categories(’echo=0′),’border=false’);

In the widget parameters:

border=false