Skip Navigation

Toolset loads an outdated FontAwesome Version

Resolved

Reported for: Toolset Types 1.0

Symptoms

Toolset loads FontAwesome version 4.x, which can create conflicts with other software that enqueues Fontawesome version 5.x (using the standard handle like Toolset does).

For example, when you activate Toolset Types the icons of a theme or other 3rd party plugins that are using Fontawesome 5.x syntax will not be visible anymore. However, Font Awesome icons version 4.x will still work.

Workaround

You can create a child theme and add this code to the functions.php:

function fix_different_version_same_handle_script() {
    
    //Dequeue/Deregister any conflicting script
    wp_dequeue_style( 'font-awesome' );
    wp_deregister_style( 'font-awesome' );

    //Re-enqueue the desired script with a different handle - change $src adequately)
    wp_enqueue_style('font-awesome-compatible', get_template_directory_uri() . '/assets/font-awesome-v5/css/fontawesome-all' . $min . '.css');

}
add_action( 'wp_enqueue_scripts', 'fix_different_version_same_handle_script', 20 );

Or, you can wait until Toolset updates the version of FontAwesome that it loads.

Comments are closed