You are here

eWlJWN
Wed, 08/09/2017 - 12:37
#1
Override shortcode files

Hi, 
we want to adjust some of the shortcode files. 
Is it possible to override e.g. "/themes/hillter/awe_shortcode/shortcode/awe_check_available_form.php" in our child-theme "hillter-child"? 
Thanks. 

eWlJWN
Thu, 08/10/2017 - 11:25

My solution: I added the following code to the functions.php of the child theme (the shortcode files have then stored in the corresponding folder "shortcode" of my theme "hillter-child")

function awe_load_builder_shortcode($path) {

    $path = array(STYLESHEETPATH . '/shortcode/');
    return $path;
}
global $awe_buider;
remove_filter('the_content', array($awe_buider, 'awe_load_builder_shortcode'));
add_filter('awe_load_builder_shortcode', 'awe_load_builder_shortcode', 20);

cindy's picture
cindyStaff
Fri, 08/11/2017 - 00:03

Hi,

With your solution, you have to copy all Shortcode files => your child theme (including some files you do not want to overwrite)

Though, your feedback is a good solution that we will definitely make a reference for next version

Please overwrite the following file in Hillter/Awe_shortcode/Config.Php

https://www.dropbox.com/s/66wfkgrpvyfarlu/config.php?dl=0

Now, you just need to create a folder named awe-shortcode in your child theme and copy which shortcodes you want to modify => that folder


Many Thanks.

eWlJWN
Fri, 08/11/2017 - 03:24

Thanks! 

A small hint: The directory name of the parent theme is "awe_shortcode" (with underscore). This could be confusing if somebody copy it to the child theme and did not see the small difference that the directory name there has to be "awe-shortcode" (with hyphen). 

cindy's picture
cindyStaff
Sat, 08/12/2017 - 00:07

Thank you

We will note your feeback for later version!

cindy's picture
cindyStaff
Tue, 08/15/2017 - 04:17

Hi Ewijwn,

We have released version 2.0.3

Please download on Themeforest and update

Log in or register to post comments