overwrite code snippet from parent to child theme

The functions in your child theme will be loaded before the functions in the parent theme. This means that if your parent and child themes both have functions called my_function() which do a similar job, the one in the parent theme will load last, meaning it will override the one in the child theme.

~Guide to Functions and Child themes

Further:

Function Priority

If you’re not using your own parent theme, or you’re using a third party one without pluggable functions, you’ll need another method.

When you write functions you can assign them a priority, which tells WordPress when to run them. You do this when adding your function to an action or filter hook. WordPress will then run the functions attached to a given hook in ascending order of priority, so those with higher numbers will run last.

Let’s imagine the function in the parent theme isn’t pluggable, and looks like this:

<?php
    function parent_function() {
        // Contents for your function here.
    }
    add_action( 'init', 'parent_function' );
?>

This means the function in your child theme would look like this:

    <?php
    function child_function() {
        // Contents for your function here.
    }
    add_action( 'init', 'child_function', 15 );
    ?>

That should get you started…

tech