Support » Theme: WP-Forge » Get back to Font Awesome

  • Resolved ddorr

    (@ddorr)


    I need to use font awesome. Wp forge it used so far 5.5.1.7

    What it is the right way?

    I copied fontawesome files from folder 5.5.1.7 then I put in wpforge last version. Finally add this snippet in functions.php on my child theme.

    //enqueues our locally supplied font awesome stylesheet
    function enqueue_our_required_stylesheets(){
        wp_enqueue_style('font-awesome', get_stylesheet_directory_uri() . '/css/font-awesome.css');
    }
    add_action('wp_enqueue_scripts','enqueue_our_required_stylesheets');

    Don’t works

Viewing 4 replies - 1 through 4 (of 4 total)
  • Theme Author ThemeAWESOME

    (@tsquez)

    Hey there,

    The reason why it isnt working is because there is no fontawesome css style sheet. Here’s what you need to do. Go back into 5.5.1.7 and copy the fonts folder. Put this folder inside the latest version of WP-Forge.

    Then add this to functions.php:

    function fontawesome_script() {
        wp_enqueue_style('wpforge-fonts', get_template_directory_uri() . '/fonts/wpforge-fonts.css' );
    }
    add_action( 'wp_enqueue_scripts', 'fontawesome_script', 0);

    I believe that should do the trick. let me know how it goes.

    Thanks a lot Tsquez.

    I put that code in functions.php of wp-forge and worked well. But I wonder if is in wp-forge or in starter theme the right place.

    Regards

    Theme Author ThemeAWESOME

    (@tsquez)

    My apologies amigo, I guess this got over looked. If you are using a child theme them I would highly suggest and recommend you add it to the child theme. Now if you are going to put it in the child theme I would follow what I wrote before but then I would use this:

    function fontawesome_script() {
        wp_enqueue_style('wpforge-fonts', get_stylesheet_directory() . '/fonts/wpforge-fonts.css' );
    }
    add_action( 'wp_enqueue_scripts', 'fontawesome_script', 0);

    Hope this helps.

    Thanks.

    I used

    function fontawesome_script() {
        wp_enqueue_style('wpforge-fonts', get_template_directory_uri() . '/fonts/wpforge-fonts.css' );
    }
    add_action('wp_enqueue_scripts', 'fontawesome_script', 0);

    Its works.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Get back to Font Awesome’ is closed to new replies.