using functions.php correctly for child themes
-
hey all, now that there’s a new method of using child themes with the enqueue script in functions.php instead of importing a new style.css:
https://codex.www.ads-software.com/Child_Themes
I’m not sure if the code in my functions.php is correct because I’ve added some template php files that I want overriding the parent theme. But It seems the the php files of the parent are still being used. The css of the child is taken though however.
here’s my functions.php in my child theme folder:
<?php
function oneengine_enqueue_style() {wp_enqueue_style( ‘oneengine-parent-style’, get_template_directory_uri() . ‘/style.css’ );
wp_enqueue_style( ‘oneengine-child-style’, get_stylesheet_uri() . ‘/style.css’ );
}
add_action( ‘wp_enqueue_scripts’, ‘oneengine_enqueue_style’ );
?>oneengine is the parent theme: is this right? or is there a url conflict?
Thanks for any help!
- The topic ‘using functions.php correctly for child themes’ is closed to new replies.