Closed timoburmeister closed 11 years ago
Hi Tim. It is better to use the wp_enqueue_style
action with the get_template_directory_uri()
function in your child theme, like so:
add_action( 'wp_enqueue_scripts', 'add_my_parent_styles' );
function add_my_parent_styles() {
wp_enqueue_style( 'my-parent-css', get_template_directory_uri() . '/style.css' );
}
because there is no easy way to extract URL from the import()
reliably as it can be relative, absolute and even remote style.
ok thanks. will give it a try!
Same issue. Where do you place this code? child style.css, .htaccess or other?
requisite2k: In your child theme's functions.php
hi,
thanks for the good idea of a simple minifier for js and css.
But seems not to work with wordpress child themes.
I guess the error is that the necessary @import command to get the parent theme css is not correct translated. Seems like the path gets screwed.
thanks!