Tagged: postslider
I am trying to customize the code in enfold-child/config-templatebuilder/avia-shortcodes/postslider/postslider.php but my changes are not reflected on the live site. I have replicated the file structure but that didn’t work.
to have your own child-theme alb elements – yes : create a subfolder in your child-theme : shortcodes and put this to your child-theme functions.php:
function avia_include_shortcode_template($paths){
$template_url = get_stylesheet_directory();
array_unshift($paths, $template_url.'/shortcodes/');
return $paths;
}
add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1);
Just to confirm – do I put the postslider.php file within the shortcodes subfolder?
yes – that is as you said above the same tree structure of folder. So put in your edited alb file to the shortcodes folder. The code above reflects exactly that structure.
For a lot of other child-theme files this will be enough ( like you tried before ) most of the php files f.e. to have your own child-theme loop-index.php. Just put it in the child-theme includes folder. There is no need to have a code snippet like the one above.
For js files there had to be new loading snippets ( de-register the parent-script – enqueue the new child-theme script) – f.e. avia-snippet-sticky-header.js file to have your own header shrinking etc. pp