• 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.

    Thanks!!!

Viewing 1 replies (of 1 total)
  • Personally, I use ftp to make a copy of my theme’s folder to my local pc before and after every major change. If you are going to be making changes to a large number of themes, you should probably look into a revision control system like Subversion.

    Whereever possible, I use a child theme. However, not all themes are ‘child-friendly’. For example, they may declare functions without checking for the function’s existence first and so the function cannot be overridden. In those cases, I copy the original php file to the child folder and rename the original so it will not be used. If I later update the theme, I have to go back and rename any files that I have copied this way, but that is much easier than merging code changes.

    As for learning php, different people learn best in different ways. I personally find the O’Reilly series of books to be excellent guides. For php, you might start with Learning PHP 5.

Viewing 1 replies (of 1 total)
  • The topic ‘Parent/Child Themes vs PHP Editing’ is closed to new replies.