Quantcast
Channel: Topic Tag: plugin | WordPress.org
Viewing all articles
Browse latest Browse all 26892

bodhi_mcgee on "[Plugin: Category Icons] Category Icon Plugin needs output category icon image outside loop"

$
0
0

Hi, Im running into trouble getting the category icon to display for the current category using the Category Icon plugin. I am trying to do this from within the category.php page.

Ive been trying to get what i need from this page, but it only shows more complex examples using lists. I only need it to output the image for the current category nothing more.
http://www.category-icons.com/2009/08/how-to-use-category-icons-tags-in-a-script/

The previous code i have been using is:

<?php
			  if (function_exists('get_cat_icon')) {
				$my_icon = get_cat_icon('echo=false');
				echo str_replace('<a', '<a class="thumb"', $my_icon);
				}
                ?>

[Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your code may now have been permanently damaged/corrupted by the forum's parser.]

But this code only works 90% of the time, outputting random category icons for other categories some of the time.

Any help much appreciated.

Bodhi McGee

http://wordpress.org/extend/plugins/category-icons/


Viewing all articles
Browse latest Browse all 26892

Trending Articles