Support » Themes and Templates » Basic Child-theme question

  • When a mod is done to a single .php file which is located like say:
    or worse:

    Do I need to copy the entire ..includes directory in my child theme directory?

    OR can I just have an includes directory (to preserve the path?) and have only the file I want to mod. My first feeling is that this might confuse WP into thinking the includes folder ONLY contained that one file.

    OR – can i just put the file.php in my child theme function.php and WP will magically find it?

    And including the entire include directory seems… heavy-handed.

    =Alan R.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You have to follow the directory structure of the Parent theme, in the child theme folder.

    So, if your Parent theme structure is:


    Then, to replace the single.php with your own modified version, in the child theme folder, you must create:


    Once you do that, WordPress will pickup and use YOUR single.php and ignore the single.php in the Parent theme.

    Hope that helps.

    Lisa – Thanks so much!

    So one last confirmation: Even though the nested includes folder contains many files, I just have to replicate the PATH and the files I want to monkey with… Right? Makes more sense that way – would be a shame to have to do the entire folder.

    =Alan R.

    You are correct 🙂

    Awesome! Tks again…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Basic Child-theme question’ is closed to new replies.