February 08, 2017
Use this function if you find yourself having to force your CSS styles with !important in your Child Theme.
// Queue parent style followed by child/customized style add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles', PHP_INT_MAX); function theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/styles/child-style.css', array( 'parent-style' ) ); }
Sourced here.