Home › Forums › Support › Enqueuing to create child themes with GP Premium › Reply To: Enqueuing to create child themes with GP Premium
December 13, 2015 at 10:44 am
#159807
Lead Developer
Lead Developer
Hi there,
GP actually does this for you, so you just need to create a child theme style.css file with the appropriate headings, and GP does the rest.
Here’s the snippet from GP:
if ( is_child_theme() ) :
wp_enqueue_style( 'generate-child', get_stylesheet_uri(), true, filemtime( get_stylesheet_directory() . '/style.css' ), 'all' );
endif;
It checks if a child theme is activated, and if it is, it enqueues the style.css file found in the child theme main directory.
Let me know if you need more info 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development