Skip to content

Child theming Material Design Google #216

Answered by PatelUtkarsh
tkeriduN asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @tkeriduN,

Can you try the following code and see if that works for you?

/**
 * Enqueue parent theme styles
 */
add_action( 'wp_enqueue_scripts', 'material_child_enqueue_styles' );

function material_child_enqueue_styles() {
	$parent_theme_handle = 'material-design-google-style';
	$theme               = wp_get_theme();
	wp_enqueue_style(
		$parent_theme_handle,
		get_template_directory_uri() . '/style.css',
		[],
		$theme->parent()->get( 'Version' )
	);

	wp_enqueue_style(
		'material-design-google-child',
		get_stylesheet_uri(),
		[ 'material-design-google-front-end-css' ],
		wp_get_theme()->get( 'Version' )
	);
}

Cheers!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tkeriduN
Comment options

Answer selected by tkeriduN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants