You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Result: Disco (parent theme) styles.css file is loading fine in the child theme.
Please note that Disco enqueues its own style.css file using functions.php. If the theme you are using as the parent theme is not enqueuing their own style.css file, it won't load on the child theme either. For example, Twenty Twenty-Three doesn't load any theme CSS file. This is how WordPress works and it's not specifically related to the plugin.
The id of the child's style.css in the generated HTML contains the name of the parent theme, not the child theme.
This issue was already fixed here and released as part of the 1.8.1 version of the plugin. Related to the answer above: If your parent theme was enqueuing the style.css file this name collision between parent and child could be causing the problem. Please update the plugin version and try again.
I'm closing this issue but feel free to re-open it if your problem persists!
A child theme created with the plugin might not work as intended, ad the parent's style.css isn't loaded automatically.
In my case, to get it to work, I had to create a functions.php file in the new theme, with these lines:
`<?php
add_action( 'wp_enqueue_scripts', function () {
$parenthandle = 'parent-style';
$theme = wp_get_theme();
wp_enqueue_style( $parenthandle,
get_template_directory_uri() . '/style.css',
array(), // If the parent theme code has a dependency, copy it to here.
$theme->parent()->get( 'Version' )
);
} );
`
Also, the id of the child's style.css in the generated HTML contains the name of the parent theme, not the child theme.
The text was updated successfully, but these errors were encountered: