Does it work with child themes?
-
Hello. First of all, thank you very much for your work and dedication.
I have created a child theme that only works with the style.css file, it brings all the css of the parent theme without the need for any function, but the css file of the child theme is never loaded.
If I use the function to load the scripts “wp_enqueue_scripts” the style.css of the child theme is not loaded either.
function wpas_enqueue_styles() { $parent_style = 'parent-style'; // Estos son los estilos del tema padre recogidos por el tema hijo. 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 ), wp_get_theme()->get('Version') ); } add_action( 'wp_enqueue_scripts', 'wpas_enqueue_styles' );
Any solution to this?
Greetings
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Does it work with child themes?’ is closed to new replies.