I have a parent theme that has a style sheet here:
theme-name/assets/apps.css
I'm trying to create a child theme and enqueue app.css in the child theme.
Tried this:
<?php
/**
* child theme functions
*
* @package My Theme
*/
add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
function enqueue_parent_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri().'app.css' );
}
But, no luck.
Romel Apuya answers:
<?php
/**
* child theme functions
*
* @package My Theme
*/
add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
function enqueue_parent_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/assets/app.css' );
}
Kyler Boudreau comments:
Romel - thank you. Worked great.
Kyle answers:
Try this:
add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
function enqueue_parent_styles() {
wp_enqueue_style( 'parent-style', get_theme_root_uri().'/theme-name/assets/app.css' );
}