How to set a default icon

Suppose you have categories that don’t have yet an icon assigned to. If you want to display a default icon instead of nothing (no icon), here is the code that you must paste in functions.php (in your theme) :

function bm_noicon($content) {
 if (empty($content)) {
   $content = '<img src="http://yourdomain.com/wp-content/uploads/cisco.gif" alt="default icon" />';
 }
 return $content;
}
add_filter('category_icons', 'bm_noicon');

Of course, you need to replace http://yourdomain.com/wp-content/uploads/cisco.gif by your own icon/image URL.