How toHow 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="" alt="default icon" />';
 return $content;
add_filter('category_icons', 'bm_noicon');

Of course, you need to replace by your own icon/image URL.