I have a coruscate premium theme. I have created a child theme for future protection. I want to override a function in file parent-theme/framework/shortcodes/widgets.php which is defined as:
function wt_shortcode_recent_posts($atts) {
//some code here
}
add_shortcode('wt_recent_posts', 'wt_shortcode_recent_posts');
Now, In my functions.php of child theme, I tried to override the function as:
function wt_shortcode_recent_posts($atts) {
//some modified code here
}
I have also tried making a file to identical directory as child-theme/framework/shortcodes/widgets.php. It also doesn't work.
What is the correct way to override those functions or php files in wordpress child theme.