Brandon Nelson
asked 3 years ago

I have set up a child theme for DW Purity, but it is loading the child CSS prior to dw-purity.min.css so my custom styles are being overridden unless I use !important.
style.css header looks like this:
Theme Name: DW Purity – CHILD
Author: 200 Megaton Creative, llc
Version: 1.0.0
Template: dw-purity
functions.php looks like this:
function my_theme_enqueue_styles() {

    $parent_style = \\\’dw-purity-style\\\’; // This is \\\’twentyfifteen-style\\\’ for the Twenty Fifteen theme.

    wp_enqueue_style( $parent_style, get_template_directory_uri() . \\\’/style.css\\\’ );
    wp_enqueue_style( \\\’dw-purity-child-style\\\’,
        get_stylesheet_directory_uri() . \\\’/style.css\\\’,
        array( $parent_style ),
add_action( \\\’wp_enqueue_scripts\\\’, \\\’my_theme_enqueue_styles\\\’ );

1 Answers
answered 3 years ago

I have answered your question here:

Powered by DW Question & Answer Pro