• A very nice and simple plugin.

    You missed one line in the functions.php though that broke dependencies for style.css

    When I added $parent_style = ‘parent-style’; everything worked like a charm.

    function theme_enqueue_styles() {
        $parent_style = 'parent-style';
        wp_enqueue_style('parent-style', get_template_directory_uri() . '/style.css');
        wp_enqueue_style('child-style', get_stylesheet_directory_uri() . '/style.css', array($parent_style));
    }
    add_action('wp_enqueue_scripts', 'theme_enqueue_styles');

    https://www.ads-software.com/plugins/child-theme-wizard/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Same here.

    Asiel

    (@lealceldeiro)

    What about if my parent theme has more than one css file (commonly the main “style.css” file)? For instance,imagine my parent theme has this structure:

    parent-theme
    |
    |-css
    |   |-main.css
    |   |-custom1.css
    |
    |-style.css

    The plugin doesn’t cover that. It just adds the main css file.

    The same with js. The plugin doesn’t load the js files of the parent theme.

    Second Files loads from Parent style.css

    With the JS you have always problem?

    —–stooni

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Missed line in functions.php’ is closed to new replies.