[Support request] How to load font awesome from CDN

Home Forums Support [Support request] How to load font awesome from CDN

Home Forums Support How to load font awesome from CDN

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #217892
    tobymiguel

    Hi

    How can I load font awesome from a CDN?

    I have tried a solution from Tom in another thread, but it is not working. It still loads the font-awesome from my own site.

    This is the code that does not work:

    add_action( 'wp_enqueue_scripts', 'generate_custom_scripts', 10 );
    function generate_custom_scripts() {
          wp_dequeue_style( 'fontawesome' );
          wp_enqueue_style( 'fontawesome-cdn', '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css', false, '4.3.0', 'all' );
    }
    #217915
    Tom
    Lead Developer
    Lead Developer

    Try replacing the “10” in the add_action call to a later number like “99”.

    Let me know 🙂

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.