I tried looking for a quick and dirty getting started with wordpress theme development tutorial. Now I know how to go and discover things myself, I'm looking for "top ten FAQ for programmers" when starting wordpress development. (For example, Turn on debugging and where the debugging option is located), how best to setup your dev environment.
All I can find is elaborate or too low level or too high level guides to it. Coming from a background of creating custom wordpress-like applications makes me frustrated.
So perhaps someone can list of the few things I need. I don't need to know how wordpress works, what a database or widget or page is.
Question I was specifically searching for: 1. How do I make wordpress watch the theme folder for changes from my IDE ( I can't really believe anybody would develop through the wordpress admin theme editor...No Undo history!). Changing the files doesn't seem to take affect until I re-install the theme. Debug mode needs to be true?
- Any links condensed version of this: http://codex.wordpress.org/Theme_Development or similar?
you need to become familiar with basic wordpress functions like the_permalink, the_title, the_content, etc. these are easy to remember and you can always refer to wordpress.org documentation if you don't want any out of box functionality and you pay more attention to design
if you intend to submit theme to wordpress.org than turn on debugging wile developing and read this before start http://codex.wordpress.org/Theme_Review
WordPress use a hierarchy of files to determine what ends up being shown to the user. For starters all you need to create a WordPress theme is a
style.css
andindex.php
.This is what you will have to put in your
style.css
in order to make it a valid WordPress theme:All you really need to include is a unique name for your theme and WordPress will recognize it and list it among your other themes. Even though that works, I would recommend including as much info as possible.
With just two files,
index.php
will then run for every single page view, no matter the type of content the user asks for. You can extend this by adding files likepage.php
to display all your pages,single.php
to display single posts differently and so on.I highly recommend getting familiar with the WordPress Codex. This is a good place to start: http://codex.wordpress.org/Template_Hierarchy
The image below explains the hierarchy and what file ends up being served. I use it sometimes for reference, there is no need to memorize it entirely.
Theme development for beginners can be made easier by basing it on an existing theme such as the twentytwelve theme. I have written a blog post on it here http://johnadavies.me/2013/09/19/wordpress-child-theme-development/ John