• Resolved phantasmix

    (@phantasmix)


    Hello,
    plugin works great, thank you.

    I’m having an issue with the fontawesome icons. My theme loads the latest version of the font, so I turned off FA in Wishlist Settings. But the icons aren’t working without that. I see that they’re still set to “fa” varieties, and the latest FA uses specific far/fas/fab prefixes. Wondering if that’ll be fixed.

    For the moment, I’m manually correcting the templates. I know it’s a bad idea ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter phantasmix

    (@phantasmix)

    Some of the icons are fixed with a simple css override:

    [class*="alg-"] i.fa {
    	font-family: 'Font Awesome 5\ Free' !important;
    }
    Plugin Author Pablo Pacheco

    (@karzin)

    Thanks @phantasmix !
    I’ll take a look at it as soon as I can.

    What solution do you think it’s the best?
    To change the CSS or the Template? I think changing the HTML seems more appropriate

    Thread Starter phantasmix

    (@phantasmix)

    Pablo,
    Everything except for the Facebook icon is fixed with the following:

    [class*="alg-"] i.fa {
    	font-family: 'Font Awesome 5\ Free' !important;
    	font-weight: 900;
    }

    Apparently some of the icons don’t work without the font-weight setting.

    Not sure what the problem is with Facebook though, maybe content? Will look closer this afternoon.

    Cleaner way would probably be to fix up the templates, but so much more fuss ??
    CSS works for me.

    Thanks

    Plugin Author Pablo Pacheco

    (@karzin)

    Hi again @phantasmix ,
    I was able to upload the plugin to version 1.6.2. Please give it a try. The icon classes will be ok this time.

    Anyway, if you need to change the icons classes there is another way, changing the classes used on the template without changing the template directly:

    add_filter( 'alg_wc_wl_fa_icon_class', function( $class, $icon ){
    	switch ( $icon ) {
    		case 'facebook':
    			$class = 'fab fa-facebook-square';
    			break;
    		case 'twitter':
    			$class = 'fab fa-twitter-square';
    			break;
    		case 'google_plus':
    			$class = 'fab fa-google-plus-square';
    			break;
    		case 'email':
    			$class = 'fas fa-envelope-square';
    			break;
    		case 'copy':
    			$class = 'fas fa-copy';
    			break;
    	}
    	return $class;
    }, 10, 2 );

    Let me know if it worked for you ??

    Thread Starter phantasmix

    (@phantasmix)

    The update fixed it all. Super ?? Thanks so much!

    P.S. Sorry, I clicked update before testing out the function code. Useful snippet to have, thanks for that as well.

    Plugin Author Pablo Pacheco

    (@karzin)

    Great then!
    See you

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘FontAwesome’ is closed to new replies.