• Resolved treebranch

    (@treebranch)


    Dear Anders,

    thanks for this marvellous theme. I created a Child theme according to www.ads-software.com guidelines, everything is working fine, only one thing isn’t and I can’t find out why:

    In the menu, the social icons at the bottom do not load. Appears that the font-awesome font file is not loaded, but I do not understand why.

    Kind regards,
    treebranch

    • This topic was modified 5 years, 7 months ago by treebranch.
    • This topic was modified 5 years, 7 months ago by treebranch.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author Anders Norén

    (@anlino)

    Hi @treebranch,

    It’s probably because you’ve enqueued the Chaplin stylesheet in your child theme without adding the FontAwesome stylesheet as a dependency. Check the registered styles and dependencies in the parent theme, and make sure that the same list of dependencies are added to your child theme. If they are, the FontAwesome fonts will load and the icons will be displayed correctly.

    — Anders

    Thread Starter treebranch

    (@treebranch)

    Hi Anders,

    thanks for your reply, now I understand and fixed the issue. In case anyone needs it for his/her childtheme:

    Add this code to functions.php in your child-theme folder:

    // Connect Child Theme and Parent Theme

    add_action( ‘wp_enqueue_scripts’, ‘chaplin_child_enqueue_styles’ );
    function chaplin_child_enqueue_styles() {

    $parent_style = ‘chaplin-style’;

    wp_enqueue_style( $parent_style, get_template_directory_uri() . ‘/style.css’ );
    wp_enqueue_style( ‘chaplin-font-awesome’, get_template_directory_uri() . ‘/assets/css/font-awesome.css’, false, 1.0, ‘all’ );
    wp_enqueue_style( ‘child-style’, get_stylesheet_directory_uri() . ‘/style.css’, array( $parent_style ), wp_get_theme()->get(‘Version’));

    }

    kind regards,
    treebranch

    Thanks treebranch, but be careful: the quotes in your code must be straightened. Still, the social icons don’t show up in my case…

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Child Theme issue: Social Icons do not load’ is closed to new replies.