Font Awesome not loading correctly
-
I have created a Storefront child theme in order to speed up my loading times. However, recently this has stopped loading the Font Awesome icons. When I check the icons in inspector, font-family has an “invalid property value” error because it’s Font Awesome 5 Free (exactly like that). If I edit it in inspector and wrap it in quotes, the icons display fine. The class is .wc-forward:after, .woocommerce-Button–next:after.
I have tried removing the if statement for enqueuing the woocommerce stylesheet, so it’s enqueued everywhere but that doesn’t help.
I have also tried installing the Font Awesome plugin but that makes no difference.
I’ve included the contents of my functions.php file below in case there is something obvious in there (although I know that’s not really supported in this forum), but I was hoping someone could tell me where Storefront includes Font Awesome 5 so I can fix it.
<?php add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' ); function enqueue_parent_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' ); } add_action('wp_enqueue_scripts','wpb_load_woocommerce'); function wpb_load_woocommerce() { if( is_page(array( 'shop', 'basket', 'checkout' ) ) or 'product' == get_post_type() ) { wp_enqueue_style( 'wpb-woo', get_stylesheet_directory_uri() . '/css/woocommerce.css', '', '3', 'all'); } } function disable_woocommerce_block_editor_styles() { wp_deregister_style( 'wc-block-editor' ); wp_deregister_style( 'wc-block-style' ); } add_action( 'enqueue_block_assets', 'disable_woocommerce_block_editor_styles', 1, 1 );The page I need help with: [log in to see the link]
The topic ‘Font Awesome not loading correctly’ is closed to new replies.
