wordpress - Function theme_enqueue_styles() for child css -


my folder child themes composed of file 'style.css' , 'functions.php' in functions.php file can not access function theme_enqueue_styles() use custom css

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

for child theme, need replace get_template_directory_uri() get_stylesheet_directory_uri().

the code should be:.

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

Comments

Popular posts from this blog

javascript - Knockout pushing observable and computed data to an observable array -

'hasOwnProperty' in javascript -

c# - Update a combobox from a presenter (MVP) -