How to extend parent theme shortcode into child thme in wordpress or extend any plugins shortcode into theme file

Just copy and paste below code into your theme's functions.php file or into your custom plugin file and change according to your need.

// Here i have no_icon_text shortcode into my parent theme.
add_action('init', 'remove_parent_no_icon_text');
function remove_parent_no_icon_text() {
// i remove shortcode of parent theme
remove_shortcode( 'no_icon_text' );
// Initialize child theme shortcode for changes into render
add_shortcode( 'no_icon_text', 'rj_extend_no_icon_text' );
}

function rj_extend_no_icon_text()
{
// shortcode render here
}

Comments

  1. T-Fal's Titanium Pan - The Art of the T-Fold - The Art of the T-Fold
    T-Fal's Titanium titanium iv chloride Pan is is titanium expensive a pan made of aluminum which has been coated in thunder titanium lights a smooth, chrome finish. The pan was designed for titanium belly ring an titanium trim walmart industrial,

    ReplyDelete

Post a Comment

Popular posts from this blog

How to add a custom sorting or order by option on category archive or product archive page in woocommerce wordpress

How to create a custom wp_list_table and bulk action in wordpress

How to add image option in nav menu in wordpress