Hi Apex,
I’m again having issues with both FontAwesome and a custom icon font on a clean install of X Theme.
1. FontAwesome
FontAwesome will load using, for instance but, after saving, the code is stripped from the Wordpress text box and replaced with (a space).
Per earlier posts, I have updated the library to the most recent one, by adding the following to the functions.php file of the child theme:
add_action( ‘wp_enqueue_scripts’, ‘custom_load_font_awesome’ );
/**
-
Enqueue Font Awesome.
*/
function custom_load_font_awesome() {wp_enqueue_style( ‘font-awesome-free’, ‘//use.fontawesome.com/releases/v5.7.1/css/all.css’ );
}
2. Custom Icon Font Issues
I have tried adding a custom font by both of the methods found in the help documentation:
a. Adding as a Custom Font Library under Theme Options > Settings > Fonts after adding code to allow for upload of .woff files in the functions.php file of the child theme. The font uploads and is shown as ‘Font 3’ but the preview shows a regular alphabet, not icons, and I cannot find any instructions as to how to call it as I do not intend using it as the default body nor headings font. I have tried using ‘Flaticon’, ‘Font 3’ and ‘Custom Font Family’ as the font-family inline in text boxes but to no effect.
b.Uploading the svg, woff, woff2 and ttf fonts into a Fonts folder in the wp-content folder of the child theme, and then adding CSS that I’ll list in a private follow up. Again, this has no effect as you can see on our home page.
As you can tell from this post, we have spent a great deal of time trying to figure this out to no avail, and this has a significant knock on effect on our business as we cannot make our site live, so any help you are able to give us asap would be much appreciated.
Regards,
Nicola