Forums

[resolved] Get Cat (category icons) Issue (2 posts)

  1. netbrains
    Member
    Posted 8 months ago #

    Hello there, Im using an plugin (category icons) to insert images on categories, Im calling for the get_cat_icons and its retrieving the incorrect category (the parent) instead of the child.

    <?php get_cat_icon('small=false'); ?>
    
    	  <?php echo category_description($category); ?>

    Now its simple and should work,but the get_cat_icon pulls any category from the parent (not always the correct one), and the echo description is always right.

    How can I call specifically the category thats being used?

  2. netbrains
    Member
    Posted 8 months ago #

    <?php
    
    $object = get_category($cat);
    if (function_exists(’get_cat_icon’)) get_cat_icon(’cat=’.$object->cat_ID);
    
    ?>

    Doh!, found in the comments on the authors blog :)

    Ty

Reply

You must log in to post.

About this Topic