• So I made a child theme for all my modifications. But what I am doing is, whenever I need to modify a file, I copy the whole file to the child directory and mod it there. But now I am thinking, maybe this is going to slow my server and website down?

    So is this ok the way I am doing it? Or how SHOULD I do it?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Do not copy all the files. Copy only those files that you need to customize. For most customizations, you can create a child theme just by using the style CSS. For instance,

    /*
    Theme Name:     Twenty Twelve Child
    Theme URI:      http://example.com/
    Description:    Child theme for the Twenty Twelve theme
    Author:         Your name here
    Author URI:     http://example.com/about/
    Template:       twentytwelve
    Version:        0.1.0
    */
    
    @import url("../twentytwelve/style.css");

    Review:
    http://codex.wordpress.org/Child_Themes

    Thread Starter Noz03

    (@noz03)

    No no, I am not copying ALL the files, but when I want to make a modification I am copying the WHOLE file, so far about 3 or 4 not counting my custom style.css. The thing Im worried is it is basically loading all the code twice and maybe this is going to cause the website to be slow. Or maybe I am totally wrong about that?

    The thing Im worried is it is basically loading all the code twice and maybe this is going to cause the website to be slow.

    Only the child theme’s files will load first and for the rest, the parent theme’s files will load. But in some cases you do not copy the entire files but only the modifications will appear in the files of the child theme.
    Edit: The exception is the functions.php of a child theme does not override its counterpart from the parent. Instead, it is loaded in addition to the parent’s functions.php – it is loaded right before the parent’s file.
    See http://codex.wordpress.org/Child_Themes#Template_Files

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Child theme files, am I doing this right?’ is closed to new replies.