Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Load styles in parent theme.
<?php
/**
* Enqueue scripts and styles.
*/
function my_theme_scripts() {
/* Enqueue parent theme styles. */
wp_enqueue_style( 'theme-slug-style', trailingslashit( get_template_directory_uri() ) . 'style.css', array(), THEME_VERSION );
/* Enqueue child theme styles. */
if ( is_child_theme() ) {
wp_enqueue_style( 'theme-slug-child-style', get_stylesheet_uri(), array(), null );
}
}
add_action( 'wp_enqueue_scripts', 'my_theme_scripts' );
@samikeijonen

This comment has been minimized.

Copy link
Owner Author

samikeijonen commented Oct 31, 2014

For more info check out how I load styles in Kuorinka theme.

There is also note in child themes not to use @import rule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.