

What are the extra gourmet ingredients, you ask? That's another long story. With a Kit: v4 compatibility is baked in (with some extra gourmet ingredients, not found in the other v4 compatibility recipes) So set up your kit in WordPress), and then in your kit settings, enable v4 compatibility.How you do that will depend on which way your trying to set up Font Awesome: When the conflicts you remove include Font Awesome version 4, and your theme or plugins reference icons by names that changed between version 4 and version 5, you'll need to do a little more work, adding the v4 shims. That's a common CDN URL for loading Font Awesome 4.7.0.įa_custom_remove_conflicts ( ) Add Version 4 Compatibility 7ca699f29404dcdb477ffe225710067f - This is the hash for the contents of the 4.7.0 font-awesome.css file.In any case, hopefully it makes it more clear how you can add more as you see fit. We've got you started with two of them that really would conflict with Font Awesome 5 if they were present in your page, so you might as well leave them in the blacklist.
#SVG FONT PICKER CODE#
Now, copy the following code into your functions.php, after the code above, adding an md5 hash to this "blacklist", for each conflict that you want the above code above to remove for you. */ if ( ! function_exists ( 'fa_custom_setup_cdn_svg' ) )
#SVG FONT PICKER PRO#
* This will load Font Awesome 5 from the Font Awesome Free or Pro CDN. Copy and paste this into your functions.php: You’ll only tweak the simpler code below to add your Kit token.

You’ll probably never need to modify the code in this function.

But if you aren't sure that you have such a use case on your hands, then that's a pretty good clue that setting up a kit is your best bet.įirst we’ll lay a foundation with this function that you’ll call with your Kit code. The "CDN" alternatives are offered because, sometimes, there are use cases where loading the Font Awesome assets directly from the CDN is preferable to loading a kit. Once you've set up a kit with one of these code snippets, you'll be able to configure and re-configure that kit right from your Font Awesome kit settings and not have to touch the PHP code again. In fact, kits are usually the best approach you can take for both performance and flexibility, especially Pro kits, especially especially SVG Pro kits. Kits are backed by a fast and stable CDN. So don't think that the kits approach in these examples is sans-CDN. Then we added kits, which are also backed by a CDN. Namely, before we had kits, the options were either to host the icon assets yourself (self-hosting), or load them from our Free or Pro CDN. The "without kits" approach is referred to as "CDN" in these examples mainly for legacy reasons. These examples and code snippets offer two different approaches to setting up Font Awesome in WordPress: with kits and without kits. I feel good about making some simple code changes to dial it in.
#SVG FONT PICKER HOW TO#
