Reply To: Enqueuing to create child themes with GP Premium

Home Forums Support Enqueuing to create child themes with GP Premium Reply To: Enqueuing to create child themes with GP Premium

#159807
Tom
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 🙂