Here we learn about how to extend parent theme shortcode into a child theme in WordPress or extend any plugins shortcode into the theme file.
Custom code copied and paste into your child theme’s functions.php file.
Here I have ‘site_icon_text’ shortcode into my parent theme.
<?php add_action('init', 'remove_parent_no_icon_text'); function remove_parent_no_icon_text() { // I remove shortcode of parent theme remove_shortcode( 'site_icon_text' ); // Initialize child theme shortcode for changes into render add_shortcode( 'site_icon_text', 'myblog_extend_no_icon_text' ); } function myblog_extend_no_icon_text() { // shortcode render here } ?>