{"id":147521,"date":"2015-10-23T11:00:53","date_gmt":"2015-10-23T15:00:53","guid":{"rendered":"http:\/\/premium.wpmudev.org\/blog\/?p=147521"},"modified":"2015-10-22T23:52:13","modified_gmt":"2015-10-23T03:52:13","slug":"icon-fonts","status":"publish","type":"post","link":"https:\/\/wpmudev.com\/blog\/icon-fonts\/","title":{"rendered":"Embedding and Using Icon Fonts With WordPress"},"content":{"rendered":"<p>Images are great and all, but they offer up challenges for websites: they require extra HTTP requests, they add file weight, and they don\u2019t scale well. Icon fonts, on the other hand, need just one HTTP request for any size set of icons, look great on any display or resolution, and you can scale the c!@# out of them.<\/p>\n<p>A lot of WordPress themes now use icon fonts, including the default Twenty Thirteen, Twenty Fourteen and Twenty Fifteen themes.<\/p>\n<p>Let&#8217;s look at why you should be using them and where to find them.<\/p>\n<h2>Why Use Icon Fonts?<\/h2>\n<p>Icon fonts use pictograms instead of text and, like text, can by styled at will by applying CSS effects to them. The beauty of this is that they can be tailored to many individual designs while remaining crisp at all display sizes \u2013 a powerful combination.<\/p>\n<div  class=\"wpdui-pic-right  \">\n\n\n\n<figure class=\"wp-caption alignright\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-490x490\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2015\/10\/cloud-search.png\" alt=\"Icon fonts: social icons, website icons, anything you can think of \u2013 only they're not images.\" width=\"490\" height=\"312\" \/><figcaption class=\"wp-caption-text\">Icon fonts: social icons, website icons, anything you can think of \u2013 only they&#8217;re not images.<\/figcaption><\/figure>\n\n<p>Instead of spending half your week monkeying around with different image sizes and re-uploading files, you can concentrate on making intelligent design decisions within a core set of flexible\u00a0options.<\/p>\n<p>Icon fonts are usually used for two basic functions: <strong>to enhance text, and to stand alone for functional or informational\u00a0purposes.<\/strong>\n\n\n\n\n<\/div>\n<p>Using icon fonts can add an instant additional layer of visual polish to your sites.<\/p>\n<p>Here are just a few of the cool things you\u2019ll be able to do once you have your icon fonts in place:<\/p>\n<ul>\n<li>Change their color to whatever you want at will<\/li>\n<li>Easily add and adjust shadows<\/li>\n<li>Add strokes, gradients, and textures<\/li>\n<li>Create smooth, eye-catching animations<\/li>\n<li>Take advantage of transparent knockouts<\/li>\n<li>Apply standard effects such as adjusting opacity or rotation<\/li>\n<li>Take advantage of cross-browser support<\/li>\n<li>Increase site speed and reduce the amount of assets that have to be loaded<\/li>\n<\/ul>\n<p>All of this is accomplished by a combination of the inherent format of icon fonts and a sprinkling of CSS goodness. Sounds like a good deal, right?<\/p>\n<p><img alt=\"Icon fonts are responsive, scalable and fast\\.\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2015\/10\/font-awesome.png\" \/><\/p>\n<h2>Where to Find Icon Fonts<\/h2>\n<p>Perform a simple Google search for \u201cicon fonts\u201d and you&#8217;ll likely be bamboozled by the slew of options that pop up. To give you a head start on getting sorted, start your search with our hand-picked mix of free and premium icon font providers:<\/p>\n<h3>IcoMoon<\/h3>\n<p>Take a trip to <a href=\"https:\/\/icomoon.io\/#home\" target=\"_blank\">IcoMoon<\/a> and you can grab a set of general purpose icons or high-quality line icons for free, or treat yourself to one of their premium options.<\/p>\n<p>There&#8217;s also an\u00a0<a href=\"https:\/\/icomoon.io\/app\/#\/select\" target=\"_blank\">intuitive\u00a0app <\/a>that makes it incredibly easy to generate and download\u00a0custom icons.<\/p>\n<figure class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-490x490\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2015\/10\/icomoon.jpg\" alt=\"Custom built and crisp icon fonts.\" width=\"490\" height=\"312\" \/><figcaption class=\"wp-caption-text\">Custom built and crisp icon fonts.<\/figcaption><\/figure>\n<h3>Font Awesome<\/h3>\n<p>Originally designed for use with\u00a0<a href=\"http:\/\/getbootstrap.com\/\" target=\"_blank\">Bootstrap<\/a>, this solid set of over 500 scalable vector icons is free for commercial use and can be styled any which way with CSS.<\/p>\n<p><a href=\"https:\/\/fontawesome.com\/\" target=\"_blank\">Font Awesome\u2019s<\/a> icons are also designed to look stunning on Retina Displays and not trip up screen readers.<\/p>\n<figure class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-490x490\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2015\/10\/font-awesome.jpg\" alt=\"The &quot;iconic font and CSS toolkit.&quot;\" width=\"490\" height=\"312\" \/><figcaption class=\"wp-caption-text\">The &#8220;iconic font and CSS toolkit.&#8221;<\/figcaption><\/figure>\n<h3>Foundation Icon Fonts 2<\/h3>\n<p><a href=\"http:\/\/zurb.com\/\" target=\"_blank\">Zurb<\/a>\u00a0provides its own <a href=\"http:\/\/zurb.com\/playground\/foundation-icons\" target=\"_blank\">free-to-use icon set<\/a>, which contains a decent collection of general, social, and accessibility icons.<\/p>\n<p>They\u2019ve been coded to be highly accessible and require just a bit of CSS and the right markup to start using right away.<\/p>\n<figure class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-490x490\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2015\/10\/zurb.jpg\" alt=\"According to Zurb, A couple lines of CSS and the right markup will get you going in no time.\" width=\"490\" height=\"312\" \/><figcaption class=\"wp-caption-text\">According to Zurb, A couple lines of CSS and the right markup will get you going in no time.<\/figcaption><\/figure>\n<h3>Fontello<\/h3>\n<p><a href=\"http:\/\/fontello.com\/\" target=\"_blank\">Fontello<\/a> is a great little tool that you can use to quickly select a custom pack of vector images you want to download.<\/p>\n<p>Simply drag and drop all of your selected icons onto Fontello. Once they are uploaded, it will appear in the Custom Icons section.<\/p>\n<figure class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-490x490\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2015\/10\/fontello.jpg\" alt=\"Fontello \u2013 an icon fonts generator.\" width=\"490\" height=\"312\" \/><figcaption class=\"wp-caption-text\">Fontello \u2013 an icon fonts generator.<\/figcaption><\/figure>\n<h3>Fontastic<\/h3>\n<p>With more than 9,000 icons available, <a href=\"http:\/\/fontastic.me\/\" target=\"_blank\">Fontastic<\/a> enables you to create your own icon fonts in just a few seconds. You can eve publish your icons as SVG Sprites.<\/p>\n<p>You can publish with just one click and every change you make instantly syncs with their servers. Too easy.<\/p>\n<figure class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-490x490\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2015\/10\/fontastic.jpg\" alt=\"Create your icon fonts in seconds.\" width=\"490\" height=\"312\" \/><figcaption class=\"wp-caption-text\">Create your icon fonts in seconds.<\/figcaption><\/figure>\n<h3>Pictos<\/h3>\n<p><a href=\"http:\/\/pictos.cc\/\" target=\"_blank\">Pictos<\/a> is one to consider if you\u2019re prepared to shell out for a set of very nice looking, high quality icon fonts.<\/p>\n<p>Each purchase includes source files in a variety of common formats such as AI, EPS, SVG and Sketch to make further customization a breeze.<\/p>\n<figure class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-490x490\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2015\/10\/pictos.jpg\" alt=\"Carefully crafted interface icons.\" width=\"490\" height=\"312\" \/><figcaption class=\"wp-caption-text\">Carefully crafted interface icons.<\/figcaption><\/figure>\n<p>Most of the sites above provide their own instructions, tutorials, and FAQ sections to help you get up and running with their icon fonts. The steps required to implement will vary in terms of complexity from provider to provider.<\/p>\n<h2>Using the WP SVG Icons Plugin<\/h2>\n<p>To keep things simple (and provide you with a fast, easy, code-free option for your site) we&#8217;ll be using the free\u00a0<a href=\"https:\/\/wordpress.org\/plugins\/svg-vector-icon-plugin\/\" target=\"_blank\">WP SVG Icons plugin<\/a>\u00a0to illustrate some of our installation tips below.<\/p>\n<p>This plugin gives you access to over 490 icons that you can easily insert anywhere on your site using shortcodes.<\/p>\n<p><span class=\"embed-youtube\" style=\"text-align:center; display: block;\"><span class=\"embed-youtube-lazy-id dev-hidden\">ZQSrZvKDtQ0<\/span><\/span><\/p>\n<p>You can even use the plugin&#8217;s import function to pull in custom icons from other sources such as IcoMoon.<\/p>\n<h2>What You Get With the WP SVG Icons Plugin<\/h2>\n<p>After you\u2019ve downloaded and installed WP SVG Icons, a new tab will appear near the bottom of your admin menu labeled <strong>WP SVG Icons<\/strong>. When you roll your mouse over it, four more tabs will appear:<\/p>\n<ol>\n<li><strong>Default Icon Set:<\/strong> This is the main tab where you can choose an icon, select an element you want to wrap it with and copy the shortcode to paste it anywhere on your site. This entire section is built right into the page and post editors, which we\u2019ll look at in the next section.<\/li>\n<li><strong>Custom Icon Set:<\/strong> If you decide to use IcoMoon for custom icon packs, this is the tab you\u2019ll use to import them for display on\u00a0your site.<\/li>\n<li><strong>Settings:<\/strong>\u00a0The plugin&#8217;s designed to be as simple and user-friendly as possible so there aren\u2019t too many settings to play around with. You can choose whether you\u2019d like to load the default icons, select a default icon element, and decide if you\u2019d like to delete all data if uninstalling.<\/li>\n<li><strong>Upgrade:<\/strong> This leads you to the <a href=\"https:\/\/www.evan-herman.com\/wp-svg-icons-pro\/\" target=\"_blank\">premium version<\/a> of the plugin which we\u2019ll discuss closer to the end of this article.<\/li>\n<\/ol>\n<h2>Embedding Icon Fonts into Your Posts and Pages<\/h2>\n<p>The WP SVG Icons plugin makes it ridiculously easy for you to insert an icon into your posts or pages. But before you do that, make sure you\u2019ve clicked your cursor in the right area of the editor where you want your icon to show up \u2013 in between two paragraphs or beside a subheading, for example.<\/p>\n<p>If you&#8217;re on a post or page edit screen, simply\u00a0look for the new button just above the visual\/text editor that\u2019s labeled <strong>Add Icon<\/strong>.<\/p>\n<div  class=\"wpdui-pic-regular  \"> <img loading=\"lazy\" decoding=\"async\" class=\"attachment-735x735\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2015\/10\/Add-Icon-Button.png\" alt=\"Add Icon Button\" width=\"735\" height=\"118\" \/> <\/div>\n<p>Once you\u2019ve clicked it, a window will open that shows you the same options you find under the <strong>Default Icon Set<\/strong> tab. This just makes it easier for inserting icon shortcodes directly into your posts or pages, without having to navigate away from the editor and copy and paste shortcodes every time.<\/p>\n<div  class=\"wpdui-pic-regular  \"> <img loading=\"lazy\" decoding=\"async\" class=\"attachment-735x735\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2015\/10\/WP-SVG-icons.png\" alt=\"WP SVG Icons screen\" width=\"735\" height=\"545\" \/> <\/div>\n<p>Scroll through the 490+ icons and select the one you want to insert. Using the element buttons at the top, you can choose whether you\u2019d like your icon wrapped with <code>h1<\/code>, <code>h2<\/code>, <code>h3<\/code>, <code>span<\/code>, <code>div<\/code>, <code>i<\/code>, or <code>b<\/code> tags. Note that the plugin will only allow you to choose one element at a time.<\/p>\n<p>Your shortcode will be generated and inserted into your post or page as soon as you click the blue <strong>Insert Icon<\/strong> button. It will show as a shortcode in the editor, but you can see what your icon looks like on your post or page by saving it as a draft and pressing the <strong>Preview<\/strong> button.<\/p>\n<h2>Embedding Icon Fonts into Your Widgetized Areas<\/h2>\n<p>Since the WP SVG Icons plugin generates shortcodes for all icons, you can simply copy and paste them into any area of your site that supports HTML \u2013\u00a0including your widgets. It\u2019s a great way to style up your sidebars and footers with more than just text.<\/p>\n<p>For example, you can navigate to <strong>Appearance &gt; Widgets<\/strong> and drag the <strong>Text<\/strong> widget into your sidebar or footer. Using the\u00a0<strong>Default Icon Set<\/strong> tab to generate your icon shortcode, paste it into the content area along with any other HTML you want to include. Hit &#8220;save&#8221; and the icon will be live on your site.<\/p>\n<h2>Importing a Custom Icon Pack from IcoMoon<\/h2>\n<p><a href=\"https:\/\/icomoon.io\/\" target=\"_blank\">IcoMoon<\/a> is one of the best places to look for free icon fonts, and the WP SVG Icon plugin has an import feature that enables users take advantage of it. While the default set of icons that comes with the plugin is great, you may want some of your icons to look a bit different and IcoMoon is perfect for that.<\/p>\n<p>To start, <a href=\"https:\/\/icomoon.io\/app\/#\/select\/library\" target=\"_blank\">visit the IcoMoon library<\/a>\u00a0through its app and browse through the collections of icon fonts available. Some will require a purchase, but the ones that are free will have an <strong>+Add<\/strong> button below them. When you\u2019ve found one you like, click <strong>+Add<\/strong>.<\/p>\n<p>You\u2019ll then be shown all the icons contained in that collection. Now you&#8217;re free to select the ones you want. Click on individual icons if you just want a few, or use your shift key to select lines of multiple icons all at once.<\/p>\n<div  class=\"wpdui-pic-regular  \"> <img loading=\"lazy\" decoding=\"async\" class=\"attachment-735x735\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2015\/10\/IcoMoon-Custom-Icon-Fonts.png\" alt=\"IcoMoon Custom Icon Fonts\" width=\"735\" height=\"335\" \/> <\/div>\n<p>Click <strong>Generate Font<\/strong> at the bottom of the screen when you\u2019re happy with your selection. From here, you have the option to customize some settings \u2013 naming your font something specific,\u00a0or changing its class prefix \u2013 by clicking on the\u00a0<strong>Preferences<\/strong> button at the top of the screen.<\/p>\n<p>Click the <strong>Download<\/strong> button at the bottom of the screen when you\u2019re all done and your fonts will arrive as a ZIP file.<\/p>\n<p>Now you can go back to your WordPress admin area and navigate to <strong>WP SVG Icons &gt; Custom Icon Set<\/strong>. Click the <strong>Choose file<\/strong> button to select the ZIP file from your Downloads folder and then click the <strong>Import<\/strong> button.<\/p>\n<p>If the import is successful, you\u2019ll be able to see all of your new icons listed on the page. Now when you click the <strong>Add Icon<\/strong> button to insert icons on any posts or pages, you\u2019ll see a new <strong>Custom Pack<\/strong> tab beside the <strong>Default Pack<\/strong> tab that you can switch over to for selecting and inserting your custom icons.<\/p>\n<div  class=\"wpdui-pic-regular  \"> <img loading=\"lazy\" decoding=\"async\" class=\"attachment-735x735\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2015\/10\/WP-SVG-icons-custom-pack.png\" alt=\"WP SVG Icons custom pack\" width=\"735\" height=\"547\" \/> <\/div>\n<p>Keep in mind that only one custom icon pack can be used at a time. If you\u2019d like to add or remove icons from your custom pack, you\u2019ll have to navigate back to the <strong>Custom Icon Set<\/strong> tab and click <strong>Uninstall Pack<\/strong> to remove everything. After that, you can return to IcoMoon to select the new icons you want, download the ZIP file, and import them.<\/p>\n<p>If you uninstall a custom icon pack but still see them appearing in WordPress, you may need to clear your web browser\u2019s cache.<\/p>\n<h2>Why You\u2019ll Probably Want to Upgrade to Premium<\/h2>\n<p>At this point, you may be wondering how to use all the other great customization options with this plugin that were listed at the beginning of the article \u2013 like changing the color of your icons, adding shadows, or even applying animation effects.<\/p>\n<p>Unfortunately, these options aren\u2019t available with the free version of the WP SVG Icons plugin. But the <a href=\"https:\/\/www.evan-herman.com\/wp-svg-icons-pro\/\" target=\"_blank\">upgrade to premium<\/a> is well worth it.<\/p>\n<p>With the premium version, a new <strong>Advanced Attributes<\/strong> button will appear in your icon editor when you click <strong>Add Icon<\/strong> on a post or page.<\/p>\n<figure class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-490x490\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2015\/10\/WP-SVG-icons-premium.png\" alt=\"WP SVG Icons premium\" width=\"490\" height=\"312\" \/><figcaption class=\"wp-caption-text\">WP SVG Icons premium<\/figcaption><\/figure>\n<p>You\u2019ll get to easily adjust the icon size, add a hyperlink to it, and set it to repeat a certain number of times. You can also give it beautiful CSS3 animation effects, set the animation to correspond to a specific event, add class names, adjust its color, and rotate it.<\/p>\n<p>When you navigate to <strong>Appearance &gt; Menus<\/strong>, you\u2019ll be able to expand each menu page to find a custom menu icon drop-down menu that\u2019s offered through the premium version of this plugin. It will be set to <strong>no icon<\/strong> by default, but you can use the drop-down menu to select the icon of your choice to add a little extra visual appeal to your menu links.<\/p>\n<p>In addition to more customization options and menu icon insertion, the premium version also enables you to use an unlimited number of custom icons, generate icon containers for use on your landing pages, and take advantage of built-in widget support for all icons.<\/p>\n<p>You even get\u00a0premium support for any problems or advice you may need on how to achieve a very specific customized look.<\/p>\n<p>While the free plugin offers great basic options for fast and easy icon font insertion, the premium version really enables you\u00a0to take it to the next level. At <a href=\"https:\/\/www.evan-herman.com\/wp-svg-icons-pro\/pricing\/\" target=\"_blank\">just $29<\/a>, it\u2019s quite affordable if you just have one WordPress site, and \u00a0developer and business licenses are available for use on multiple sites.<\/p>\n<h2>Wrapping Up<\/h2>\n<p>Icon fonts are a great way of adding extra visual polish to your sites without slowing down load times, forcing you to create Retina-specific images or having to worry about image scaling issues.<\/p>\n<p>Fortunately, there are also several high-quality sources of free font icon packs available online such as IcoMoon and Font Awesome.<\/p>\n<p>For users who really want to set up icons on their sites\u00a0as quickly and seamlessly as possible, without having to dabble with code, using the free\u00a0<a href=\"https:\/\/wordpress.org\/plugins\/svg-vector-icon-plugin\/\" target=\"_blank\">WP SVG Icons plugin<\/a>\u00a0is pretty much a no-brainer. If you want to kick things up a level, the premium version of the plugin is well-worth exploring.<\/p>\n<p>If you want some further reading on using icons, check out <a href=\"https:\/\/wpmudev.com\/blog\/social-media-css-sprites\/\" target=\"_blank\">Adding Social Media icons to WordPress with CSS Sprites<\/a>, and if you want to read up on fonts,\u00a0have a read through\u00a0<a href=\"https:\/\/wpmudev.com\/blog\/find-choose-install-fonts\/\" target=\"_blank\">How to Find, Choose and Install Beautiful Fonts on Your WordPress Website (With Examples)<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Images are great and all, but they offer up challenges for websites: they require extra HTTP requests, they add file weight, and they don\u2019t scale well. Icon fonts, on the other hand, need just one HTTP request for any size set of icons, look great on any display or resolution, and you can scale the c!@# out of them.<\/p>\n","protected":false},"author":37930,"featured_media":147872,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"blog_reading_time":"","wds_primary_category":0,"wds_primary_tutorials_categories":0,"footnotes":""},"categories":[263],"tags":[10284,10286,973],"tutorials_categories":[],"class_list":["post-147521","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-icomoon","tag-wp-svg-icons","tag-fonts"],"_links":{"self":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/147521","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/users\/37930"}],"replies":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/comments?post=147521"}],"version-history":[{"count":19,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/147521\/revisions"}],"predecessor-version":[{"id":207130,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/147521\/revisions\/207130"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media\/147872"}],"wp:attachment":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media?parent=147521"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/categories?post=147521"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tags?post=147521"},{"taxonomy":"tutorials_categories","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tutorials_categories?post=147521"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}