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

'hasOwnProperty' in javascript -

python - ValueError: No axis named 1 for object type <class 'pandas.core.series.Series'> -

java - How to provide dependency injections in Eclipse RCP 3.x? -