megwoo
6/25/2015 - 7:30 PM

WordPress Add Child Theme CSS after Parent

// to add child theme css after parent theme css

// if using this, do not need @import on child style.css

<?php

add_action( 'wp_enqueue_scripts', 'enqueue_child_theme_styles', PHP_INT_MAX);
function enqueue_child_theme_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
    wp_enqueue_style( 'child-style', get_stylesheet_uri(), array('parent-style')  );
}

?>