Category Icons
Category Icon Plugin needs output category icon image outside loop (2 posts)

  1. bodhi_mcgee
    Posted 2 years ago #

    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.

    The previous code i have been using is:

    			  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


  2. submarine
    Plugin Author

    Posted 2 years ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Category Icons
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic