• Resolved roady

    (@malania)


    Hey guys,

    I have a theme named roady which includes a certain file in the sub-directory.

    For example, I want to modify links.php which is stored in
    roady/includes/links.php

    I have created a child theme folder – roady-childtheme, added the required style.css and activated the child theme.

    So far so good, just that, I’m not able to apply the child-theme effect on links.php or any other file stored in a sub-directory in a parent theme.

    I have tried creating the same folder inside the child theme such as:

    roady-childtheme/includes/links.php

    but it doesn’t work so far. (and yes, my child-links.php is modified)

    What am I missing guys?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Have you tried adding this to your functions.php file for your child theme?

    <?php get_template_part(  'includes/links' ); ?>

    (This is not tested so let me know if it works)

    Thread Starter roady

    (@malania)

    That didn’t work.

    What worked is – require_once( get_stylesheet_directory() . '/includes/my_included_file.php' );

    Thanks nonetheless ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add a file from sub-directory to child theme’ is closed to new replies.