How toHow to get rid of the 1 appearing sometimes after an icon

That’s because get_cat_icon is echoed without the “echo=false” parameter. So, to remove the “1″ that is displayed after the icons, do this :

echo get_cat_icon("echo=false");

or just :

get_cat_icon();

2 thoughts on “How to get rid of the 1 appearing sometimes after an icon

  1. According to the Markup Validator (http://validator.w3.org), Category Icons is putting alt tags in incorrectly. It’s using the title, like so:

    … which results in too many quote marks, messing up the html. Is this something you’ll fix in an upcoming release? Is there a way to override it meanwhile?

    Thanks.

  2. OK, I fixed the above issue by changing line 193-195 in category_icons.php.
    Instead of using the $title tag in $alt, I use the category name, same way you use that for $title, the replace [alt="'.$alt.'"] in 195 with simply ['.$alt.']:

    $alt = ‘alt=”‘.get_cat_name($p['cat'][$i]).’”‘;
    if (function_exists(‘seo_friendly_images’) && 1 == get_option(‘igcaticons_useseo_plugin’)) $title = ” ; // Compatibility with qTranslate
    $cat_icons .= ‘src=”‘.$url.’” width=”‘.$w.’” height=”‘.$h.’” ‘.$alt.’ ‘.$title.’ />’.$urlend.$p['suffix'];