• Resolved mimo

    (@mimothemes)


    Hi, i am trying to add new icons but fontawesome library gets de-activated(not loaded in select option ), it only loads my new icons?

    How can i add new icons to the existing list without deleting fontawesome default ones?

    I am also trying to add a conditional function to include my items(just to see if the plugin is activated). Do you know how i can do this?

    I am using if(function_exists(‘tax_icons_init’) but is not working ??

    Thank you very much, your plugin is great!

    Best Regards

    https://www.ads-software.com/plugins/taxonomy-icons/

Viewing 1 replies (of 1 total)
  • Plugin Author Mickey Kay

    (@mcguive7)

    Hi Mimo,

    I’m guessing you’re fully replacing the contents of the icon array accidentally, instead of appending your icons in addition to the existing icons. Here’s an example of how you can add a single icon:

    add_filter( 'tax_icons_icon_array', 'prefix_filter_tax_icons_array' );
    function prefix_filter_tax_icons_array( $icon_array ) {
    	$icon_array[ 'new-icon-1-name' ] = 'new-icon-1-classes';
    	$icon_array[ 'new-icon-2-name' ] = 'new-icon-2-classes';
    	return $icon_array;
    }

    As far as this conditional goes: if(function_exists('tax_icons_init')

    That should work just fine, not sure why it wouldn’t be unless you’re calling it before the plugin is loaded.

    Let me know if that helps!

Viewing 1 replies (of 1 total)
  • The topic ‘Add new icons’ is closed to new replies.