Hey guys,
Love the unite theme, great work! However, there are a few things I’d like to change. I followed the WP-guideline for creating a child theme which works good so far. I created my own style.css file for my child-theme, but it seems that not all parent-styles (from the parent style.css) are loaded. It only works if I include a @import url("…/unite/style.css");
in my child style.css, which is not best practice. If I do not include the @import line, the styles from my child-css are loaded, but not the parent-styles. I checked the get_template_directory_uri()
and get_stylesheet_directory_uri()
, they are correct.
This is my child functions.php:
<?php
function theme_enqueue_styles() {
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', 'theme_enqueue_styles' );
?>
I also attached my child style.css. Can you guys help me on that?
- Andreas