Since version x.x.x.14 Font Awesome is not referenced by default in the Ignite theme, by default it only loads the ION icons font.
Even though the font is not referenced it’s still included in the theme and you can still use it, to add it to your theme follow the steps below.
CSS Only Themes
- Open your site with SharePoint designer
- Go to All Files -> Style Library -> Theme Name -> JS
- Check out and edit the BTScripts.js in advanced mode
- At the top of the file add the following code
var head = document.getElementsByTagName('head')[0];
var fontAwesome = document.createElement('link');
fontAwesome.setAttribute('type', 'text/css');
fontAwesome.setAttribute('href', path+'css/font-awesome.min.css');
fontAwesome.setAttribute('rel', 'stylesheet');
head.appendChild(fontAwesome); - Save the file, do a check in and publish the major version
- Refresh your browser using CTRL + F5
Sandbox themes with master pages
- Open your site with SharePoint designer
- Go to All Files -> _catalogs -> masterpage -> themename
- Check out the master pages
- Locate the code block below
if (typeof window.BTThemejQuery == 'undefined') {
document.write('<script type="text/javascript" src="'+path+'js/jquery.min.js"><' + '/script>');
} - Underneath it paste this code
if (typeof window.fontawesomeDeclared === 'undefined') {
window.fontawesomeDeclared = true;
document.write('<link rel="stylesheet" type="text/css" href="'+path+'css/font-awesome.min.css"' + '/>' );
} - Save the file, do a check in and publish the major version
- Repeat steps 4 to 7 to all masters
Farm themes (SharePoint on premises only)
- Open your site with SharePoint designer
- Go to All Files -> _catalogs -> masterpage
- Check out the master pages of the theme
- Locate the block code below
<SharePoint:CssRegistration name="/_layouts/15/1033/STYLES/ THEMENAMEPackage /COREV15.css" runat="server" after="SharepointCssFile" />
- Underneath it paste this code
<SharePoint:CssRegistration name="/_layouts/15/1033/STYLES/THEMENAMEPackage/ font-awesome.min.css " runat="server" after="SharepointCssFile" />
- Replace the theme name by the name of your theme
- Save the file, do a check in and publish the major version
- Repeat steps 4 to 7 to all masters
Comments