• Resolved cogdog

    (@cogdog)


    Love this theme! Noted when used as parent to a child theme, the font-awesome CSS is not found because it is referenced via:

    get_stylesheet_directory_uri()

    I got around it by copying the /fa directory to my child theme.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello Cogdog and All,

    I appreciate this question/comment is over a month old, and you seem to have found a workaround.
    However, in case anyone is facing the same issue, the solution is (and I think this was discussed here) simply to add the below enqueue code to your Child’s FUNCTIONS.PHP file (see below 2nd wp_enqueue_style line, right after enqueuing the stylesheet). See below :

    add_action( 'wp_enqueue_scripts', 'enqueue_child_theme_styles', PHP_INT_MAX);
    function enqueue_child_theme_styles() {
      wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
      wp_enqueue_style( 'hitchcock_fontawesome', get_template_directory_uri() . '/fa/css/font-awesome.css' );
    
    }

    If you use the above, you don’t have to move the /fa folder from its original location.
    This works great on my site. I hope this can help someone.
    Christophe

    • This reply was modified 6 years, 1 month ago by chris1030.
    • This reply was modified 6 years, 1 month ago by chris1030.
    • This reply was modified 6 years, 1 month ago by chris1030.
    • This reply was modified 6 years, 1 month ago by chris1030.

    Thanks @chris1030 ! That helped.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Font Awesome CSS Lost in Child Theme’ is closed to new replies.