129 posts
  • Has referred 1+ members
  • Has sold $100+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+2 more
n-media says

Hi Theme Experts,

I want to include font awesome in my theme, is there an official plugin I can use in the theme? http://fortawesome.github.io/Font-Awesome/icons/

I could not find official and with licensed plugin for this. Please send any suggestions.

Thanks all :)

576 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+3 more
Gareth_Gillman says

It’s simple to do without a plugin:

1) upload the css and font files to your theme folder

2) Add the CSS to WP head by using the enqueue_style function (link)

171 posts
  • Has referred 1+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Has been part of the Envato Community for over 4 years
+2 more
MsTrends says

It’s simple to do without a plugin:

1) upload the css and font files to your theme folder

2) Add the CSS to WP head by using the enqueue_style function (link)

We can actually strip out step one by using CDN link to CSS file. e.g.

wp_enqueue_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css');
19 posts
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Had an item featured in an Envato Pack
+4 more
prestahome says

I do not know whether the use of a CDN is ok in this case, what if the template you bought a few thousand times and CDN stop working? This is not a large file, it is better to have it locally.

576 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+3 more
Gareth_Gillman says

I do not know whether the use of a CDN is ok in this case, what if the template you bought a few thousand times and CDN stop working? This is not a large file, it is better to have it locally.

I would also do it locally as the cdn could go down, they could modify it and break the file etc, I prefer to use local copies of scripts just so I am in full control of what happens.

1138 posts
  • Has referred 50+ members
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 50+ items on Envato Market
+5 more
Smartik says

Include it directly in your theme or plugin and use wp_enqueue_style. Also you may need an array with all names to include in theme options, metaboxes, etc. Here is the help(Please see instructions.): https://github.com/Smartik89/SMK-Font-Awesome-PHP-JSON :)

171 posts
  • Has referred 1+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Has been part of the Envato Community for over 4 years
+2 more
MsTrends says

I do not know whether the use of a CDN is ok in this case, what if the template you bought a few thousand times and CDN stop working? This is not a large file, it is better to have it locally.

The answer is same i think, what if google fonts api site goes down? as most of the templates/themes here use those fonts. Although, in this case file size is only 20 KB, its not much, it goes down to ones own choice. However, speaking generally, there are many advantages of using CDN version: Why should I use Google’s CDN for jQuery?

3434 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $500,000+ on Envato Market
  • Located in United States
  • Helps us moderate the forums
+10 more
sevenspark Volunteer moderator says

I also vote for placing Font Awesome in your theme/plugin and properly enqueueing it.

Using a CDN for Google Web fonts is one thing – if they don’t load, you have a system fallback.

If Font Awesome icons don’t load, you’ll get a bunch of unknown characters since they’re not in the standard unicode set.

Sidenote: loading jQuery from a CDN is your choice if you’re managing your own site (though then you have to manually keep it up to date), but if you are releasing a theme or plugin publicly you should NEVER do that – it would be very irresponsible (and also isn’t allowed by ThemeForest) :)

171 posts
  • Has referred 1+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Has been part of the Envato Community for over 4 years
+2 more
MsTrends says

I also vote for placing Font Awesome in your theme/plugin and properly enqueueing it.

Using a CDN for Google Web fonts is one thing – if they don’t load, you have a system fallback.

If Font Awesome icons don’t load, you’ll get a bunch of unknown characters since they’re not in the standard unicode set.

Sidenote: loading jQuery from a CDN is your choice if you’re managing your own site (though then you have to manually keep it up to date), but if you are releasing a theme or plugin publicly you should NEVER do that – it would be very irresponsible (and also isn’t allowed by ThemeForest) :)

For jQuery in WP, i agree, using CDN version is bad practice as WP has built in jQuery library. But for HTML templates i think CDN version is better (for caching and other benefits). However, if you want to be on safe side you can always include local jQuery version as fallback. Same goes for CSS.

But yes, one can simply use local files for the sake of simplicity :)

129 posts
  • Has referred 1+ members
  • Has sold $100+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+2 more
n-media says

Thank you so much all of you. You guys rocks!! :)

Espeically sevenspark :)

by
by
by
by
by
by