[wp-hackers] Theme File Structure

Andrew Bartel andrew.bartel at gmail.com
Wed Mar 27 21:11:38 UTC 2013

Depends, is this going to be a publicly released theme?  If not, I often
abstract functionality that isn't directly content display related to one
off plugins for that project only.  I started doing that after reading this
article: http://wpcandy.com/teaches/how-to-create-a-functionality-plugin

For themes that going to be reused across projects I generally follow the
basics of the file structure you described.

-Andrew Bartel

On Wed, Mar 27, 2013 at 11:25 AM, Dobri <dyordan1 at ramapo.edu> wrote:

> Hey guys,
> Thought I could borrow your brain for something:
> I'm working on a theme that is very specialized and very complicated. The
> more I add to it, the more of a hell it becomes to manage. My current
> strategy is to have individual folders for sections of functionality and in
> each folder have a main file that includes pretty much everything in that
> folder with some comments as to what each include is responsible for. Then,
> all of those "organizer" files are included in my functions.php file. Other
> than that, in the root of the theme I have a couple of templates and the
> usual sidebar/header/footer/style/index/etc. I also have a resources folder
> that contains extra css, js files and images/icons/etc. each type in a
> subfolder. Lastly, I have a utility folder that is not used by WordPress
> but is theme-related functionality that is used by automated scripting on
> the server. Is this a good file structure for the theme? It seems that all
> the folders are just a bunch of layers of nothing since everything ends up
> being included in the funct
>  ions.php file anyway. Is there a better approach to organizing all of the
> code?
> TL;DR: What is a good way to organize files in a complicated theme?
> Thanks!
> ~Dobri
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

More information about the wp-hackers mailing list