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 );?>
Share
Improve this question
asked Nov 13, 2018 at 6:24
Madhur JainMadhur Jain
1
2
- Inspect the element's CSS with the browser's developer tools which each theme active. Do you notice any different rules being applied? – Jacob Peattie Commented Nov 13, 2018 at 7:47
- 1 Hi Jacob, I searched and found that parent style has dependency on bootstrap.css. I added the dependency in functions.php and it worked out fine. Thanks for your effort and time !! – Madhur Jain Commented Nov 13, 2018 at 8:49
1 Answer
Reset to default 0Parent 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