WordPress - Overwriting a Shortcode

You have to write this code in your Child Theme's functions.php

add_action( 'after_setup_theme', 'calling_child_theme_setup' );

function calling_child_theme_setup() {
   remove_shortcode( 'parent_shortcode_function' );
   add_shortcode( 'shortcode_name', 'child_shortcode_function' );
}

function child_shortcode_function( $atts) {
    $atts = shortcode_atts( array(
        'img'  => '',
        'cat'  => '',
        'capt' => '',
        'link' => ''
    ), $atts );

//YOUR OWN CODE HERE

    $imgSrc = wp_get_attachment_image_src( $atts['img'], 'delicious-gallery' );

    $imgFull = wp_get_attachment_image_src( $atts['img'], 'full' );



    $b = '<div class="screen-item" data-groups=\'["'.strtolower(str_replace(' ', '_', $atts["cat"])).'", "all"]\'>'.

        '<a href="'.$atts["link"].'" data-title="'.$atts["capt"].'" target="_blank"><img src="'.$imgSrc[0].'" alt="SCREEN" class="screenImg" /></a>'.

        '<span>'.$atts["capt"].'</span>'.

    '</div>';

//YOUR OWN CODE HERE

    return $b;
}

you need to call remove_shortcode(); like this:

remove_shortcode('jo_customers_testimonials_slider');` 

Before you add your new shortcode with the same name to "overwrite" it.

You'll also need to call it after the parent theme has run so we fire on an action hook called wp_loaded.

function overwrite_shortcode() {

    function jo_customers_testimonials_slider_with_thumbnail($atts) {
        extract(shortcode_atts(array('limit' => 5, "widget_title" => __('What Are People Saying', 'jo'), 'text_color' => "#000"), $atts));
        $content = "";
        $loopArgs = array("post_type" => "customers", "posts_per_page" => $limit, 'ignore_sticky_posts' => 1);

        $postsLoop = new WP_Query($loopArgs);
        $content = "";

        $content .= '...';
        $content .= get_the_post_thumbnail(get_the_ID(), 'thumbnail');
        $content .= '...';
        $content .= '...';

        wp_reset_query();
        return $content;
    }

    remove_shortcode('jo_customers_testimonials_slider');
    add_shortcode('jo_customers_testimonials_slider', 'jo_customers_testimonials_slider_with_thumbnail');
}

add_action('wp_loaded', 'overwrite_shortcode');