Editing Templates: Dangerous For Beginners? (3 posts)

  1. twedigteam
    Posted 5 years ago #

    Not exactly a support question, but hopefully someone out there can expose some WP wisdom:

    I've recently [today] become familiar with the whole parent/child theme process and am comfortable editing stylistically this way. While I'm OK on the HTML/CSS front, I have no PHP knowledge.

    My question: how does everyone/is there a way to back up changes to .php files in the same fashion a child .css overrides the parent .css? I find this method to be simple and secure. The project I am working on is inevitably going to require some minor PHP hacks and I am (at the moment) uncomfortable with performing without the security of reverting to an earlier "save" or "version".

    P.S. any suggestions on a good starting point to learning PHP? Is it worth the time? I've started WP 3 weeks ago and am really keen on learning the in's and out's.


  2. Read through this Codex page on Child Themes, in particular the section on Template Files.

    Templates in a child theme behave just like style.css, in that they override their namesakes from the parent. A child theme can override any parental template by simply using a file with the same name. (Note: index.php can only be overriden in WordPress 3.0 and newer.)

    Again, this WordPress feature allows modifying the templates of a parent theme without actually editing them, so that modifications are preserved when the parent theme is updated.

  3. twedigteam
    Posted 5 years ago #

    Awesome, thanks!!!

Topic Closed

This topic has been closed to new replies.

About this Topic