Forum Replies Created

Viewing 1 replies (of 1 total)
  • I think I’m maybe way too late, and I’m no expert by far, I’m noob. But I had the same problem as @bicartwright and I’ve figured it out in case it might help you. If you’ve noticed the comment beside the “$parent_style = ‘twentysixteen’;” line in the Child Themes codex page, it said:

    // This is ‘twentyfifteen-style’ for the Twenty Fifteen theme.

    which means, you should put your theme’s name instead of parent not the whole parent style. So here it goes:

    function twentysixteen_child_enqueue_styles() {
    
        $parent_style = 'twentysixteen-style'; // This is 'twentyfifteen-style' for the Twenty Fifteen theme.
    
        wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
        wp_enqueue_style( 'twentysixteen-child-style',
            get_stylesheet_directory_uri() . '/style.css',
            array( $parent_style ),
            wp_get_theme()->get('Version')
        );
    }
    add_action( 'wp_enqueue_scripts', 'twentysixteen_child_enqueue_styles' );

    and viola it worked for me :). Hope it helps

Viewing 1 replies (of 1 total)