Can't override map shortcode
in Shortcodes
Dear support,
I need help in overriding the map shortcode in the Betheme Child theme but it does not reflect on the changes. Below is the snippet of the code in the functions.php on the child theme. Am i doing correctly? Btw, the Betheme Child is activated already.
add_action( 'after_setup_theme', 'mfnch_textdomain' );
function mfnch_textdomain() {
load_child_theme_textdomain( 'betheme', get_stylesheet_directory() . '/languages' );
load_child_theme_textdomain( 'mfn-opts', get_stylesheet_directory() . '/languages' );
}
add_action( 'init', 'calling_child_theme_setup' );
/* ---------------------------------------------------------------------------
* Map [map] [/map]
* --------------------------------------------------------------------------- */
function calling_child_theme_setup() {
remove_shortcode( 'map');
add_shortcode( 'map', 'my_sc_map' );
}
function my_sc_map( $attr, $content = null ) {
// my modified codes
}
Comments
what you ask for, requires files customization what in reference to Item Support Policy is not allowed. So if you want to modify files and don’t know how, you should contact with your web developer. The policy says:
Item support does not include services to modify or extend the item beyond the original features, style and functionality described on the item page. For customization services that will help you tailor the item to your specific requirements, we recommend contacting the author to see if they privately offer paid customisation services or checking out the great service providers on Envato Studio.
Best regards,
Muffin Group team
You only need to overwrite the function "sc_map"