Link to home
Start Free TrialLog in
Avatar of APD Toronto
APD TorontoFlag for Canada

asked on

WordPress Themes

Hi Experts,

I am learning the WP, and I am wondering are there any disadvantages of building your own parent themes like security? I know very well PHP, HTML and CSS.

As well, any disadvantages of using other themes like TK?

Thanks,
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Please see:
https://codex.wordpress.org/Theme_Development
https://codex.wordpress.org/Child_Themes

There is nothing holding you back from creating or deploying Parent Themes.  What you probably don't want to do is modify Parent Themes.  The modifications may be lost during upgrades, so better to use a Child that will not get overwritten.
Avatar of APD Toronto

ASKER

Any drawbacks of using other parent themes that are pre-made, like TK?
"Any drawbacks" is a pretty broad question, especially without any context.  Sort of like "any drawbacks of using gasoline" when you don't know what the use case might be.  So we could answer "yes" or "no" and we might be giving good advice or terrible advice, and the only thing we wouldn't know is whether our advice was good or bad.

Here's my take on it... Try to achieve your objectives as simply as possible, using the minimum amount of code and as little experimentation as possible.  Try to find examples that come as close as possible to your objective and stick within the boundaries of those examples.  Do your best to understand and document your code experiments; build a "teaching library" with your narrative and code examples.

In computer science there is a software development philosophy called YAGNI and it might be applicable here.  In almost all projects, it's highly applicable to the first few iterations of the deployment.
Sorry, by drawback I meant, can an update be pushed that messes up you website even when you use a child theme?
I think the general idea of child themes is to isolate and encapsulate your child theme, so that it lives as a subset of its parent theme.  If you choose a parent theme that has a long life, your child theme will be able to have a long life, too.  As a general rule, you can count on the most well-respected parent themes to have long and stable lives.  Maybe someday an update will mess things up, but that is not the expectation for any foreseeable future.  Mostly parent themes are like software releases.  Once you've deployed on the master branch, you've made a public commitment and you don't breach the public trust.  Bugfix changes appear in sub-release numbers from time to time.  Breaking changes are almost never introduced.

If you're interested in learning more about public deployment, this is a small article with a wealth of knowledge behind it!
http://nvie.com/posts/a-successful-git-branching-model/
I'll review the post. Are all themes verified by WP? Or can a theme developer ever expose something intentionally?
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks Ray!
Avatar of Jason C. Levine
Ray is more or less correct with his answers but I just wanted to expand on a few of them:

I think the general idea of child themes is to isolate and encapsulate your child theme, so that it lives as a subset of its parent theme.  If you choose a parent theme that has a long life, your child theme will be able to have a long life, too.

Child themes take on the function, appearance and template of the parent UNLESS you provide modifications to the child theme files that then take precedence over the parent.  So if you are using a child and depending on a function present in the parent and it updates, the child may be affected.  It depends on what and how the function is and if you are doing something that conflicts.  For templates (HTML and CSS), using a child theme ensures your modifications are safe from being overwritten by an update but you still might have issues if the update renames things and now your targeting is off.

As a general rule, you can count on the most well-respected parent themes to have long and stable lives.

Sort of true.  There is a right and wrong way to update parent themes.  Good theme developers stick to standards.  Cowboy developers tend to break things.  Some themes are very much intended to be parents (the Twenty-Whatever series, Genesis, Thesis, etc) and in the cases of theme frameworks, the instructions pretty much tell you to make child themes from step 1.  Other themes can be used as parents but unless the developer knows his/her stuff, they may break things.  

Unfortunately, the signal to noise ratio surrounding WordPress is pretty profoundly weighted to the noise side. That, combined with lots of people using WordPress without a strong grounding in PHP, HTML and CSS, leads to a lot of poorly developed themes taking on "popular" status and being held up as "good" when in fact they are anything but.