Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #414176

    I have a posts category called events. On the archive page the iconfont is a pencil. I want to change that to \ue85b. Should I use CSS or functions.php? I tried both ways, but didn’t get it right either way.

    I wasn’t sure how to do it in CSS.

    In functions.php I tried the following code based on another post on the forum:

    if(is_category('events')) {
    add_filter('avf_default_icons','avia_replace_standard_icon', 10, 1);
    function avia_replace_standard_icon($icons)
    {
    $icons['standard']	 = array( 'font' =>'entypo-fontello', 'icon' => 'ue85b');
    return $icons;
    }
    }

    But, it didn’t work. Any Advice?
    Thank you!

    #414179

    I removed the if(is_category(‘events’)) wrapper and it worked. I don’t see a typo. Do you know why this might not be working when I add the if is statement?

    #415019

    Hi!

    I think the if statement needs to go inside the function, not outside it.

    Regards,
    Rikard

    #415033

    Hi!

    Do you have an “events” category? Try to replace the code with this:

    add_filter('avf_default_icons','avia_replace_standard_icon', 10, 1);
    function avia_replace_standard_icon($icons)
    {
    if(is_category('events')) {
    $icons['standard']	 = array( 'font' =>'entypo-fontello', 'icon' => 'ue85b');
    }
    return $icons;
    }

    Regards,
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.