Title: WordPress stability when coding theme from scratch
Last modified: August 19, 2016

---

# WordPress stability when coding theme from scratch

 *  [nomoretables](https://wordpress.org/support/users/nomoretables/)
 * (@nomoretables)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/wordpress-stability-when-coding-theme-from-scratch/)
 * I recently started to create my own theme from scratch using resources like Codex
   and WordPress Theme Design by Tessa Blakeley Silver. However, I had to use a 
   lot of code snippets I got from various tutorials around the web for certain 
   things I wanted to achieve.
 * My question is. How stable would such a theme (using various code snippets not
   from codex) be when it comes to future WordPress upgrades. Will the things I 
   achieved with custom code still work in future WordPress versions? You see I 
   am confused. While Codex explains that this piece of code is for this, in some
   of the tutorials I read, where I got custom code snippets, people were saying
   this is non standard code etc. How safe it is to use such code, since I do not
   always understand the php? And for that matter using plugins that were custom
   hacked to achieve certain functions? Sometimes that don’t say that it’s custom
   code, and sometimes it’s normal codex code, that has just been cleverly used 
   by a great programmers. I wouldn’t know the difference between custom code and
   really creative use of codex code.
 * My concern is that I am using code from all over the show, and I only know a 
   bit of php, so I don’t know if the code I’m using is “secure and future proof”
   and if it will break when I install certain plugins in the future?
 * Or do I have it wrong. Are the WordPress Core files nicely tucked away and when
   I’m creating a template, those files are never touched? There are a lot of tutorials
   on how to create a wordpress theme, but how do I know that the methods in these
   tutorials are “safe” and can be trusted. Is there a definitive guide?
 * Can you guys point me to an official WordPress resource that can tell me more
   about the “safe” way to develop a WordPress theme, and for example what to watch
   out for when using code snippets from all over the net, that’s non standard and
   not on Codex?
 * I can’t find info that gives me the big picture when it comes to creating themes.
   I can’t find resources where someone take a step back and says, “this is why 
   we are designing a theme like this and not like this.” “This is why I’m using
   code like this and not this.” “This the right way, but this way will cause problems”.
   I’d like to get a 5000 foot view, before getting so deep into it, and not realizing
   I’m doing it all wrong…
 * Thanks
    Nomoretables

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [s_ha_dum](https://wordpress.org/support/users/apljdi/)
 * (@apljdi)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/wordpress-stability-when-coding-theme-from-scratch/#post-1277891)
 * > How stable would such a theme (using various code snippets not from codex) 
   > be when it comes to future WordPress upgrades.
 * Depends on the code snippets.
 * > Will the things I achieved with custom code still work in future WordPress 
   > versions?
 * Again, depends on the code.
 * > How safe it is to use such code, since I do not always understand the php?
 * Honestly, learn to understand the PHP.
 * > Sometimes that don’t say that it’s custom code, and sometimes it’s normal codex
   > code, that has just been cleverly used by a great programmers. I wouldn’t know
   > the difference between custom code and really creative use of codex code.
 * I think you are worrying too much about ‘codex’ code. Maybe 1% of what I use 
   is identifiably from the codex. Mostly, the codex tells you how to use the WordPress
   core functions. Everything else is up to you.
 * > My concern is that I am using code from all over the show, and I only know 
   > a bit of php, so I don’t know if the code I’m using is “secure and future proof”
   > and if it will break when I install certain plugins in the future?
 * Anything could break in the future and eventually probably will. WordPress core
   functions could change, and do change though the backwards compatibility is very
   good. PHP itself can change and does. MySql can change. Apache can change. Server
   configurations can change. Browsers, Javascript itself and javascript libraries
   like jQuery (God bless jQuery) can change, and all of them do change. Nothing
   is future proof. The best you can do is make sure you aren’t using deprecated
   functions. You can find that out by checking the codex. Deprecated functions 
   are usually marked. They are also marked in the source code you are prone to 
   reading the function source like I am.
 * Secure code is another matter. Its a big topic. [Google is your friend](http://www.google.com/search?q=secure+PHP&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a).
   Basically, trust no one. Validate everything.
 * And yes, some plugins will break other plugins. Some even break core functions.
   You can’t design a theme to avoid that.
 * > Are the WordPress Core files nicely tucked away and when I’m creating a template,
   > those files are never touched?
 * Basically, yes. Themes are quasi-isolated animals by design. You never really
   need to hack core files for most themes. WP has an extensive API and there are
   [hooks](http://codex.wordpress.org/Plugin_API/Hooks_2.0.x) and [filters](http://codex.wordpress.org/Plugin_API/Filter_Reference)
   a-plenty that should let you do most anything. Learn to use them. That will help
   with insuring forward compatibility too. And really, if you don’t understand 
   the PHP you shouldn’t even be thinking about a core hack.
 * > … but how do I know that the methods in these tutorials are “safe” and can 
   > be trusted.
 * Learn to understand the PHP. Sorry, but if you want to know something is safe
   you have to know what it does.
 * > Can you guys point me to an official WordPress resource…
 * The official WordPress resource is the Codex. The codex also links to external
   documents which I count as fairly reliable. Also, the WordPress Codex is very
   good, despite complaints I see about it sometimes. Try working out a macro using
   OpenOffice’s API reference, then come back and complain about WP’s codex. There,
   I said it.
 * > I can’t find info that gives me the big picture when it comes to creating themes.
 * I don’t know that such a thing really exists. The Codex is [full of information about themes though](http://codex.wordpress.org/Theme_Development),
   maybe because a large part of the API is geared towards themes. [This page](http://codex.wordpress.org/Template_Hierarchy),
   I count as one of the single most useful.
 *  Thread Starter [nomoretables](https://wordpress.org/support/users/nomoretables/)
 * (@nomoretables)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/wordpress-stability-when-coding-theme-from-scratch/#post-1278028)
 * Thanks for your insights!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘WordPress stability when coding theme from scratch’ is closed to new 
replies.

 * 2 replies
 * 2 participants
 * Last reply from: [nomoretables](https://wordpress.org/support/users/nomoretables/)
 * Last activity: [16 years, 5 months ago](https://wordpress.org/support/topic/wordpress-stability-when-coding-theme-from-scratch/#post-1278028)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
