0

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 );?>
  • 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 Nov 13 '18 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 Nov 13 '18 at 8:49
0

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.com/a/252360/153981

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.