Hi Guys, Just getting into wordpress and I feel like i’ve got a lot of catching up to do. I’m a process control freak and it’s making it really hard to get started because i’m still unsure where is the best place to start.
I Currently build a html version of the site before I convert it to wordpress to make sure everything is looking as it should.
My main question is about how do you structure your wordpress builds? Do you try and use as few files outside the default wordpress structure as possible, meaning home.php for the homepage and page.php for a content page. How would you approach custom pages with different layouts?
Also most of the tutorials like wordpress for designers and wordpress beginner to master seem to include all the fuctionality in the functions.php file, but most of the templates i’ve been looking at seem to use functions.php to include multiple files and define some global variables. Do files have to be included in a certain order or is this more of an OO approach?
I would like to build a framework that includes common admin options that i can use on all my themes. How would I go about structuring this and what would I include so that i can have default options for all themes but also add custom options per theme? I’ve been looking at how wooThemes appraoch this and they seem to have a functions folder and an includes folder, but i’m not sure how they are splitting there code into the two folders. What goes in the functions folder and what goes in the includes folder? Also does everything get called from functions.php or are files called from functions.php calling other files? I just don’t know what the best practice appraoch is and any help would be great.
I really like the DRY approach used alot in ruby on rails and would like to tackle wordpress with the same approach.
Thats the problem, where do I start? for example building a navigation admin panel for pre wordpress 3.0 themes which has some jquery ui functionality. How would this be structured so that it can be built into a framework to use on multiple themes?
I believe your theme will reflect your public target. What you need to do is just to offer something useful for the client. There is no right or wrong way to build things. IF you check others authors they will do same things differently. I believe if you are worry about the structure, the best thing is to check what other people have being done. So, you can compare with your own ideas.
A lot of authors here on TF are raising the bar for Wordpress themes and are including a lot of custom functions and things with their themes, which involve a lot of code outside of the standard theme files.
functions.php is where typically the excess PHP functions go with a theme, however it can be really messy if you start racking up a ton of code in there.
I personally organize all of my custom functions in a folder named “framework” with a file that includes all the files of the framework. I place that entire framework folder in my theme folder. Then, in functions.php I setup my typical theme specific things like sidebars and widget stuff. Then I simply include the framework file.
Thanks themeblvd, this is exactly the information I was talking about, wish more people would share their approach as I think it would benefit the structure of the templates sold on theme forest. What would you put in the framework folder? is it code that can be reused on multiple themes, what about custom code specific to one theme?
- Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
- Open a support ticket if you would like specific help with your account, deposits or purchases.
- Item Support by authors is optional and may vary. Please see the Support tab on each item page.
Most of all, enjoy your time here. Thank you for being a valued Envato community member.