• Dear reader,

    I’m sorry if this is a double post, but I couldn’t really find a post that matches my problem exactly.
    I’ve been working on creating a child theme for some minor customizations of the Iconic-One theme. After following the tutorials and creating a style.css and functions.php in the child theme directory, it won’t load the parent style in the child theme.
    This is my functions.php:

    <?php
    function theme_enqueue_styles() {
    
        $parent_style = 'parent-style';
    
        wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
        wp_enqueue_style( $parent_style, get_template_directory_uri() . '/custom.css' );
        wp_enqueue_style( $parent_style, get_template_directory_uri() . '/rtl.css' );
        wp_enqueue_style( $parent_style, get_template_directory_uri() . '/css/ie.css' );
        wp_enqueue_style( 'child-style',
            get_stylesheet_directory_uri() . '/style.css',
            array( $parent_style )
        );
    }
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    
    ?>

    NOTE: I did add some custom lines to make it include a few other css files from the parent as well.

    So I was wondering what I’m doing wrong here. I’ve not included the style.css of the child theme, as it is empty right now. (Apart from the information section, of course.)

    Any help would be greatly apreciated! And I’m happy to provide more information if needed.

    Regards,

    Bik

The topic ‘Child theme not inhereting’ is closed to new replies.