While creating and activating the child theme, the font size decreases as compared to parent theme
<?php function my_theme_enqueue_styles() {
$parent_style = 'spicepress-style'; // This is 'spicepress-style' for the Spicepress theme.
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/style.css',
array( $parent_style ),
wp_get_theme()->get('Version')
);}add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles',10 );?>
While creating and activating the child theme, the font size decreases as compared to parent theme
<?php function my_theme_enqueue_styles() {
$parent_style = 'spicepress-style'; // This is 'spicepress-style' for the Spicepress theme.
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/style.css',
array( $parent_style ),
wp_get_theme()->get('Version')
);}add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles',10 );?>
Parent style had dependency on bootstrap.css. I added the dependency in the functions.php and it worked out fine.
Found this link helpful for my problem https://wordpress.stackexchange/a/252360/153981