Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #803473

    normaly we have to preserve the structure of the parent theme.
    but for shortcodes we only have to make a subfolder in the child-theme-folder (normaly: enfold-child) called shortcodes and add this to functions.php of the child-theme:

    add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1);
    function avia_include_shortcode_template($paths){
      $template_url = get_stylesheet_directory();
          array_unshift($paths, $template_url.'/shortcodes/');
      return $paths;
    }

    that works good – but what if we want to replace a php file in framework or includes folder?
    I tried only to preserve hierarchical structure and make subfolders the same name in enfold-child.
    I tested it with loop-index.php for a thread here on board – and it works without any snippet in the functions.php – is that ok- is it the usual way?

    Or do we need a snippet too?

    #804715

    Hey Guenter,

    That is the usual way, most of the themes do work like that to the folders that they allow to be modified ion a child theme,

    Best regards,
    Basilis

    #805537

    so shortcodes will also work without snippet if i make a folder in this way? :
    enfold-child/config-templatebuilder/avia-shortcodes

    #807120

    Hi,

    No, for shortcodes we do need the snippet, because we want to replace their function, it is a different usage than WordPress functions!

    Best regards,
    Basilis

    #808300

    thanks can be closed

    #808365

    Hi,
    Glad we were able to help, we will close this now. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘new shortcodes or edited shortcodes in child-theme’ is closed to new replies.