• Resolved Lan

    (@col4l)


    Hi WP,

    I am considering making a child theme before updating so I can keep all the modifications I made to the existing theme. Please help.

    Also, I am using the 2011 theme, do we really have to update it? The WordPress is already in its newest version.

    Thanks.

Viewing 14 replies - 1 through 14 (of 14 total)
  • esmi

    (@esmi)

    Have you reviewed child theme? You would need to move all of the changes you made to the 2011 theme to your new child theme before updating the 2011 theme.

    Thread Starter Lan

    (@col4l)

    Thanks for the link. (hope the child theme is a download type).

    Thread Starter Lan

    (@col4l)

    It looks like there is no easy download type child theme…

    WPyogi

    (@wpyogi)

    You need to create one.

    Thread Starter Lan

    (@col4l)

    Just located the theme folder!

    Thread Starter Lan

    (@col4l)

    Qs:

    Replace all 2013 with 2011?
    Theme URI: Is that my website address?
    Version: 1.7 (for 2011 theme?)

    This below is from the link Child Theme
    Theme Name: Twenty Thirteen Child
    Theme URI: https://example.com/twenty-thirteen-child/
    Description: Twenty Thirteen Child Theme
    Author: John Doe
    Author URI: https://example.com
    Template: twentythirteen
    Version: 1.0.0
    */

    @import url(“../twentythirteen/style.css”);

    /* =Theme customization starts here
    ————————————————————– */

    WPyogi

    (@wpyogi)

    You need to change that to this:

    Theme Name: Twenty Eleven Child
    Theme URI: https://example.com/twenty-eleven-child/
    Description: Twenty Eleven Child Theme
    Author: John Doe
    Author URI: https://example.com
    Template: twentyeleven
    Version: 1.0.0
    */
    
    @import url("../twentyeleven/style.css");
    
    /* =Theme customization starts here
    -------------------------------------------------------------- */

    Thread Starter Lan

    (@col4l)

    So the example.com stays there?

    Do I just copy and paste everything from the current 2011 style.css file into this new child theme file?

    WPyogi

    (@wpyogi)

    You can change any of those lines above EXCEPT the Template line and the @import line. So change example.com to your site if you like, and probably the author too – since that’s you :)!

    Ideally, you should only put changes in the child theme style.css file – otherwise you have duplicate code and it’s much harder to keep track of what you’ve changed. You can use a file comparison program to find your changes – this is a good one:

    https://www.diffchecker.com/

    wen.wainwright

    (@wenwainwright)

    WPyogi is right, of course. I can share the not as good of a system that has worked for me in the past as part of this whole learning process.

    (use a text editor for all of this)

    If you have only made changes to the style sheet then you need the bit they already posted and you need to save it as style.css and put it in a folder named twentyeleven-child. You can then highlight/copy the style.css that is active on your theme right now. You can save all of this in that folder on your desktop. If you have made changes to any of the other Twenty Eleven files you just copy and paste the whole thing, like if you made changes to page.php. Save those copy/paste files in the twentyeleven-child folder. If you have made any changes to FUNCTIONS.PHP, that’s different. You can’t cut and paste all of functions.php. You’ll need the opening tag <?php and then you can put just the changes in, if you aren’t sure what is and isn’t a change then copy and paste it into a text editor but DO NOT include it in the child theme. Next upload your child theme and then update twenty eleven and everything should be fine. If you made changes to functions.php upload, with the other files in your child theme folder (or afterwards), then upload a file called functions.php with just the opening tags (and closing tags…I can’t seem to find a consistent answer to this). Then you will have to take the copy you made of the original functions.php before you updated and compare it to the updated one and add just the changes to the uploaded blank one.

    Thread Starter Lan

    (@col4l)

    OK. The author is the WP team ??

    I changed the codes months ago ??

    That’s why this time I did not update the theme as last time I lost all the changes after updating…

    Thread Starter Lan

    (@col4l)

    Thanks again, the process looks very ??

    I am going to copy everything into the child theme file…then I will press the update button :O

    wen.wainwright

    (@wenwainwright)

    Just remember to not copy the functions.php file. It will break it all.

    Thread Starter Lan

    (@col4l)

    Thanks again!

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Child Theme Help’ is closed to new replies.