'Understrap Child Theme - Font Awesome icons not appearing
I'm building a Wordpress site with Understrap, customizing a child theme. The way I understand it, the theme comes with Font Awesome installed. I'm attempting to add some icons, like so:
<i class="fab fa-facebook"></i>
But all I see in the browser is what looks like a weird slanted hamburger. See Image It looks like the styles are being pulled in when I inspect. See Image
Not sure what I'm missing. Is there some special step I need to take to activate Font Awesome? Everything's being imported correctly as far as I can tell. I'm just using the default child theme.
Solution 1:[1]
First check the page source to see if the parent theme styles have been enqueued or not. You must use the following code to load parent theme style. Put this code in the child theme functions.php file :
add_action( 'wp_enqueue_scripts', 'prefix_load_parent_theme_style');
function prefix_load_parent_theme_style() {
wp_enqueue_style( 'parent-style',
get_template_directory_uri().'/style.css' );
}
Solution 2:[2]
Try and redeclare the font:
.fa-apple:before{
font-family: Font Awesome;
}
Sometimes it gets overridden by other :before fonts
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Siavash |
| Solution 2 | Tanya Rix |
