This topic has 6 replies, 4 voices, and was last updated 7 years, 5 months ago ago by Rose Tyler
Hi,
I have purchased this theme and I want to edit the [share] shortcode in order to delete the social networks we don’t use, please can syou tell me where edit it?
Thanks id advanced,
Hello,
To edit [share] shortcode you have to modify the file wp-content/themes/royal/framework/shortcodes.php (the section “! Share This Product”).
Regards,
Dilackson.
Hi,
I suppouse that if I modify this, in future update the changes can be lost.
Is possible to do it in the child theme? I should create the theme structure in the child theme to do it? Or maybe in the functions.php add one copy of the function and change the [share] name?
Thanks!
Hello @ibiscomputer,
You should previously unset working fuction of parent theme to make child theme fuctiion work without errors. Please add following code into the functions.php of the child theme and replace ...
with copy of the parent theme share shortcode functon.
function remove_parent_functions() {
remove_shortcode('share', 'etheme_share_shortcode');
add_shortcode('share', 'etheme_share_shortcode_child');
}
add_action('init','remove_parent_functions');
function etheme_share_shortcode_child($atts, $content = null) {.....................
Regards,
Max Mullins
Great, that works fine!
Thanks
Hello,
You’re welcome!
Regards,
Rose Tyler.
The issue related to '‘Where the [share] shot code can be edited?’' has been successfully resolved, and the topic is now closed for further responses