WordPress.org

Ready to get started?Download WordPress

Forums

Category Icons
[resolved] Category Icons and Suffusion (10 posts)

  1. geoffhanna
    Member
    Posted 1 year ago #

    I am having a world of trouble getting my category icons to appear where I expect and in the correct size.

    Can someone point me to a reference or just explain where I should be seeing the large icons, where I should be seeing the small icons, and where I should be seeing no icons at all.

    I am using Category Icons v 2.2.1 and Suffusion v4.2.8. I am working mainly with the Magazine template.

    Thanks in advance for any help provided! :)

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

  2. submarine
    Member
    Plugin Author

    Posted 1 year ago #

    The doc for the get_cat_icon is here.

    My advice : use Firebug (or the tool included with Chrome or Safari) to find where you should display your icon if it's not in front of the post title.

    Or, you should read this tutorial (just replace get_cat_icon_lite by get_cat_icon).

  3. geoffhanna
    Member
    Posted 1 year ago #

    Thank you, now I have small icons appearing on individual posts, before the title, along with the number "1".

    Why is that?

    Also, how do I replace the small icons that appear on the category page with the large icons?

    Thanks for your help!

  4. submarine
    Member
    Plugin Author

    Posted 1 year ago #

  5. geoffhanna
    Member
    Posted 1 year ago #

    The post at the first link tells me I have a bad "echo" in my code "somewhere". But I didn't write any code. I modified four files because your plugin's instructions told me to do so, but in all four cases I simply pasted in the code snippet that your plugin provided.

    None of them contained "echo".

    Where should I be looking for this bad echo?

    The second link you refer me to is also no help. What files should I be inspecting for get_cat_icon? I looked everywhere I could imagine and I can't find it anywhere.

    I remain mystified.

  6. submarine
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    By default, get_cat_icon echoes the html by itself, no need to echo it. If you echo get_cat_icon without the "echo=false" parameter, you'll have a "1" displayed. So, here, you're using it in a script, so it must not be echoed. Paste the following code in functions.php to display normal sized icons in Suffusion in front of the title if you don't want to paste the template tag in several files. I think that should do the job.

    add_filter( 'suffusion_get_post_title_and_link', 'bm_caticons );
    
    function bm_caticons($entry_title) {
      return get_cat_icon('echo=false&small=false').$entry_title;
    }
  7. geoffhanna
    Member
    Posted 1 year ago #

    That works, mostly, and thanks!

    I still get one weird thing. When a post is displayed on the category page, only one category icon shows up even if the post is in multiple categories.

    When I look at the post in single-post view it shows all of the icons.

    Weird.

    Thanks again!

  8. submarine
    Member
    Plugin Author

    Posted 1 year ago #

    That's not weird : it's the way I wanted it to work. But in the next version, I'll add an option in the panel settings to display all the icons in the category page.

  9. geoffhanna
    Member
    Posted 1 year ago #

    Thanks again for your help :)

    You don't happen to know which suffusion file contains the category page description do you? I'd like to increase the size of that category icon as well :)

    Thanks again!

  10. submarine
    Member
    Plugin Author

    Posted 1 year ago #

    No, sorry. You're welcome, geoffhanna. :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic