Support » Fixing WordPress » Fresh TwentySeventeen completely ignores child theme css

  • I have an issue with Twenty Seventeen child theme.

    I have created both style.css and functions.php files. I have successfully loaded the -child theme and my website is currently running it. However, whatever changes I make in the child style.css, they are completely ignored.

    I want my child style.css to overwrite any default twentyseventeen style.css rules.
    The problem is, no matter what I write in my child style.css file, it is completely ignored and all the styles are loaded from parent style.css

    Any help would be appreciated.

    style.css code:

     Theme Name:   Twenty Seventeen Child
     Theme URI:
     Description:  Twenty Seventeen Child theme
     Author:       Author
     Author URI:
     Template:     twentyseventeen
     Version:      1.0.0
     License:      GNU General Public License v2 or later
     License URI:
     Tags:         light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
     Text Domain:  twenty-seventeen-child

    functions.php code

    function my_theme_enqueue_styles() {
        $parent_style = 'parent-style'; // This is 'twentyfifteen-style' for the Twenty Fifteen theme.
        wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
        wp_enqueue_style( 'child-style',
            get_stylesheet_directory_uri() . '/style.css',
            array( $parent_style ),
    add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Steven Stern (sterndata)


    Forum Moderator & Support Team Rep

    Please provide a link to your site. Thanks.

    also, please provide examples of CSS in the child theme which you have tried to use to overwrite the parent CSS …



    In your functions php code your cut and paste version is for twentyfifteen

    this line:
    $parent_style = ‘parent-style’;

    needs to contain the twentyseventeen style sheet
    $parent_style = ‘twentyseventeen-style’;

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fresh TwentySeventeen completely ignores child theme css’ is closed to new replies.