Why is the Child Theme Stylesheet Not Loading?

There’s no need for more code in your functions.php file to enqueue the parent themes css from your child theme. The problem is that by adding that code, you’re enqueueing the parent theme’s CSS a second time, but it’s now loading after the child theme. This means that all the changes you made in the child theme will have no effect.

Simply remove that line and you should see the changes in your child theme.

Added:
Here are the two files I used with only the basics to properly enqueue the child theme css.

style.css file:

/*
 * Theme Name: HashOne Child
 * Template: hashone
 * Text Domain: hashone-chile
 */

functions.php file:

<?php
add_action( 'wp_enqueue_scripts', function() {
  wp_enqueue_style( 'hashone-parent-style', get_template_directory_uri() . '/style.css' );
});

Leave a Comment