Child theme not inheriting certain scripts and styles

I am using this theme:https://dessign.net/sold-responsive-woocommerce-free/
and I have created a child theme. I set it up by adding

    function theme_enqueue_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() .  
    /style.css' );
    }
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );

but certain things are not being applied like the sticky headeror mobile menu. Is there anything else I need to include?

Related posts

1 comment

  1. Your child theme’s stylesheet will usually be loaded automatically. If it is not, you will need to enqueue it as well. Setting ‘parent-style’ as a dependency will ensure that the child theme stylesheet loads after it. See here a more detailed discussion :

    <?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' );
    ?>
    

    https://codex.wordpress.org/Child_Themes

Comments are closed.