• Hi,

    Was meddling with adding a child theme – inheriting works for most of it (can see the style similar to parent) – but the item name is blue in the child theme, and headers arent bolded etc. May I know what should be added on to inherit all styles? Many thanks!

    using this in child theme functions.php:

    function theme_enqueue_styles() {
    
        $parent_style = 'parent-style';
    
        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 )
        );
    }
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
Viewing 1 replies (of 1 total)
  • Theme Author VW THEMES

    (@vowelweb)

    Hello @vadevalor,

    Add the below code instead of your code it will load all the parent theme styles.

    function theme_enqueue_styles() {
    $parent_style = ‘food-grocery-store-basic-style’; // Style handle of parent theme.
    wp_enqueue_style( $parent_style, get_template_directory_uri() . ‘/style.css’ );
    wp_enqueue_style( ‘child-style’, get_stylesheet_uri(), array( $parent_style ) );
    }
    add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );

    Thanks.

Viewing 1 replies (of 1 total)
  • The topic ‘Child theme support – css not fully inherited’ is closed to new replies.