Tagged: child theme
Hi
I would like to use a modified magazine.php under config-templatebuilder > avia-shortcodes in my child theme.
I created the necessary folders and created put the modified magazine.php in there but it doesn’t take over the parent’s theme magazine.php for some reason?
Any idea?
Thanks
Hey website2create!
Thank you for using our theme.
You have to tell Enfold to load this file.
Make sure you have the same directory structrure as in the parent theme.
In functions.php of the child theme put the following:
//set the child theme folder that contains the modified shortcodes and make sure, it is the first element
function add_child_shortcode_folder($paths)
{
if(! is_array( $paths ) )
{
$paths = array();
}
$child_path = array(dirname(__FILE__) ."/avia-shortcodes/");
$paths = array_merge($child_path, $paths);
return $paths;
}
add_filter('avia_load_shortcodes','add_child_shortcode_folder', 1000);
Cheers!
Günter
Hey
The code you posted didn’t work – one small thing – I had to set:
$child_path = array(dirname(__FILE__) .”/config-templatebuilder/avia-shortcodes/”);
instead of
$child_path = array(dirname(__FILE__) .”/avia-shortcodes/”);
Now it works
Thanks!
One more question, if I want to add another path, how I add it?