I have installed the theme and child theme, however the child theme does not seem to override the parent theme files.
I have added shortcodes.php and vc_shortcode.php which originally belong to the theme root folder and put edited copies which work in the original parent location, to the child root folder. These however are not overriding. Maybe there is a line of code required somewhere in another file to instruct this override?
Advancing from this, I can force in the childs function.php to look at the files using the lines of code below, however from the child directory the shortcodes don't seem to function properly.
require_once (get_stylesheet_directory() . '/shortcodes.php'); // include shortcodes require_once (get_stylesheet_directory() . '/vc_shortcode.php'); // include shortcodes
What is the best way to customize existing shortcodes in the child theme so that they do not break when the parent theme is updated please?
First, I want to mention that we are not recommending you to place
shortcodes.php file in child theme because we want to improve it
functionality and you will not get them if you will throw this file in
child-theme
Second, shortcodes.php contains functions, so it’s implementation in
child-theme will be the same as with functions.php file. I mean that if
you want to place it in child-theme you should delete it from the
parent-theme otherwise it will throw errors because of function
redeclaration,
If your only reason to use Child Theme is to change the text from
shortcode generated sections we advice you to use a WP Codestyling
Localization plugin
I was actually wanting to change the html output of the shortcode pricing function, so that i could add additional custom classes or field types to the OT Pricing Tables module. Would WP Codestyling Localization plugin allow me to do this - as it seems it just allows me to change the existing text output?
If I cannot do the above with the recommended plugin, would you recommend I create a custom shortcode in child functions.php? If so, I would like to be able to input different values for each module instance, just as your current shortcodes do. So I have the ability to add a different 'Title' for each instance of the same shortcode just as the shortcode's back-end modules allow now.
How would you recommend I go about this please?
Thank you for your help this far, I look forward to your response.
I have installed the theme and child theme, however the child theme does not seem to override the parent theme files.
I have added shortcodes.php and vc_shortcode.php which originally belong to the theme root folder and put edited copies which work in the original parent location, to the child root folder. These however are not overriding. Maybe there is a line of code required somewhere in another file to instruct this override?
Please could you reply ASAP
Kind Regards,
Emanuel Francis
Advancing from this, I can force in the childs function.php to look at the files using the lines of code below, however from the child directory the shortcodes don't seem to function properly.
require_once (get_stylesheet_directory() . '/shortcodes.php'); // include shortcodes
require_once (get_stylesheet_directory() . '/vc_shortcode.php'); // include shortcodes
What is the best way to customize existing shortcodes in the child theme so that they do not break when the parent theme is updated please?
Kind Regards,
Emanuel
Hi there,
First, I want to mention that we are not recommending you to place shortcodes.php file in child theme because we want to improve it functionality and you will not get them if you will throw this file in child-theme
Second, shortcodes.php contains functions, so it’s implementation in child-theme will be the same as with functions.php file. I mean that if you want to place it in child-theme you should delete it from the parent-theme otherwise it will throw errors because of function redeclaration,
If your only reason to use Child Theme is to change the text from shortcode generated sections we advice you to use a WP Codestyling Localization plugin
Best Regards
Hi, thank you very much for replying.
I was actually wanting to change the html output of the shortcode pricing function, so that i could add additional custom classes or field types to the OT Pricing Tables module. Would WP Codestyling Localization plugin allow me to do this - as it seems it just allows me to change the existing text output?
If I cannot do the above with the recommended plugin, would you recommend I create a custom shortcode in child functions.php? If so, I would like to be able to input different values for each module instance, just as your current shortcodes do. So I have the ability to add a different 'Title' for each instance of the same shortcode just as the shortcode's back-end modules allow now.
How would you recommend I go about this please?
Thank you for your help this far, I look forward to your response.
Kind Regards,
Emanuel
Hello,
Please let me know about your issues and I'll fixed and update your issues in last version.
Please clear your issues for understand and fixed help you
Thank you