Child Theme Not Overriding Parent Theme

I know this question has been asked many times. I even spent the entire day yesterday getting things to work but to no avail. I am pretty sure I am missing out on something small//silly but I am unable to figure it out.

So, here is my question:
I have purchased the Identity-vcard theme from Envato and I want to make some modifications to the child theme without disturbing the parent theme. But the style.css of the child theme is not loading/overriding the parent’s.
I am using this in the functions.php

function my_theme_enqueue_styles() {
    $parent_style = ‘Identity-vcard-style’;

    wp_enqueue_style( $parent_style, get_template_directory_uri() . ‘/style.css’ );
    wp_enqueue_style( ‘Identity-vcard-child-style’, get_stylesheet_uri() . ‘/style.css’, array( $parent_style ) );
add_action( ‘wp_enqueue_scripts’, ‘my_theme_enqueue_styles’ );

Can you please help me with this?


Solutions Collecting From Web of "Child Theme Not Overriding Parent Theme"

You are using get_stylesheet_uri() which links directly to your stylesheet, then your adding /style.css which is resulting in an invalid url.

So you need to remove the /style.css.

Or use get_stylesheet_directory_uri() and leave the /style.css on there.

Make sure you use get_stylesheet_directory_uri() in child theme and make sure that the parent theme is using get_template_directory_uri().

If the parent theme is not using get_template_directory_uri() you’ll have to unregister the main style and register it again in your child theme.