162 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
+3 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 :)

1014 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
+5 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)

205 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
+1 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');
240 posts
  • Made it to the Authors' Hall of Fame
  • Contributed a free file of the month
  • Has sold $40,000+ on Envato Market
  • Had an item featured on Envato Market
+6 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.

1014 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
+5 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.

1347 posts
  • Has been part of the Envato Community for over 4 years
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 50+ items on Envato Market
+4 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 :)

205 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
+1 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?

3524 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $750,000+ on Envato Market
  • Located in United States
  • Helps us moderate the forums
+10 more
sevenspark
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) :)

205 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
+1 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 :)

162 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
+3 more
n-media
says

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

Espeically sevenspark :)

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by