• Hi, I have a twenty ten theme. My working website that can be seen here.
    https://66.147.244.132/~sohostre/
    Until now I created a child theme and made modifications to style.css successfully. Now looks like I need to make changes to PHP files. So my question is, is it ok if I just copy all the theme php files into my child theme folder? Then I can just make changes to all of those files in WordPress under Appearance/Editor when ever I want. Is that correct or am I missing anything?

Viewing 8 replies - 1 through 8 (of 8 total)
  • So my question is, is it ok if I just copy all the theme php files into my child theme folder?

    Copy only those files that you really need to edit/modify. Do not copy functions.php, but add only some non-conflicting additional functions in a skeletal file that may contain only something like this:

    <?php
    
    // add any additional functions here

    Thread Starter vannapragal

    (@vannapragal)

    I am sorry, I din’t understand your second sentence. Can you be more specific?

    Thanks.

    Re-read it. You don’t need to change all the functions, do you? So, just create a file with only what I have given above and then add your modified/ additional functions.

    Thread Starter vannapragal

    (@vannapragal)

    Let me make myself clear, I am not a programmer! I do know the meaning of half the things you said. What are functions? What are all those symbols
    ‘<?php

    // add any additional functions here”

    How do I create a file with what you have given above. That sentence doesn’t even make sense. Please help if you can make me understand, you are just confusing me.

    Sorry if I am not clear to you. Please wait till someone else explains to you in a better way.

    Thread Starter vannapragal

    (@vannapragal)

    Please let me know if anyone else can help me.

    For any .php files EXCEPT functions.php, you put a copy of the file in the child theme and make changes to the copy there.

    For the functions.php file, do NOT copy it – it’s handled differently – see:
    https://codex.www.ads-software.com/Child_Themes#Using_functions.php

    The specifics depend on what functions you are adding or changing.

    Thread Starter vannapragal

    (@vannapragal)

    OK now I got it, thank you!!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘copying files into child theme’ is closed to new replies.