Which method should I use to create a child theme

  • Anonymous

    #10106

    I am trying to create a child theme for my website. When I go to the WordPress Codex I am instructed to “enqueue the parent and child theme stylesheets” instead of using @import.

    This was the suggested code:

    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );

    }

    However, since I have more than one style.css it instructs that I “maintain all of the Parent Theme dependencies”. I have absolutely no idea what this means. I was able to easily make a child theme using @import on a test version of my site, but I want to know if that is a safe method before I do the same thing on my main site.

    Or could someone give me an idea of how to maintain all the dependencies, please?

    I found 7 different .css files in the following order:

    editor-style-rtl.css

    editor-style.css

    rtl.css

    style-bbpress.css

    style-light.css

    style-print.css

    style.css

    Thanks in advance for any help you can give me, and I hope I formatted this question correctly.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.