Hi, I understand that I need to use a child theme ‘.css and function.php’ file in my ‘Vantage-child’ directory. I need to set up the function.php file correctly and I’m seeing through WordPress forums that I need to enqueue the style.css?
Does this look correct and will it align with the @import code given in the child style.css?
<?php
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
}
—end
Thanks!
Hi mjordan
Here is a vanilla child theme ready to go:
https://siteorigin.com/wp-content/uploads/2015/01/vantage-child-vanilla-enqueue.zip
Check it out, it should answer your question.
Thank you! I should see the child theme option in my dashboard? or does this an invisible function?
@Andrew Misplon, Isn’t there a missing ?> in your functions.php at the end?
Hey jetform
It’s correct without the closing tag. The reply here puts it better than I would :)
Hope that helps :) If in doubt, you can also check out _s which is possibly the most vetted starter theme out there. Last line in functions.