7 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 6-7 years
zennit says

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.

Cheers

7 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 6-7 years
zennit says

I really like the DRY approach used alot in ruby on rails and would like to tackle wordpress with the same approach.

16 posts
  • Bought between 1 and 9 items
  • Brazil
  • Exclusive Author
  • Has been a member for 4-5 years
theux says

Hi,

www.digwp.com is a good resource. As http://www.smashingmagazine.com/ tutorials.

The only advice I would give you is keep things simples. Start with the basic and add more stuff only if necessary.

Bests,

7 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 6-7 years
zennit says

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?

16 posts
  • Bought between 1 and 9 items
  • Brazil
  • Exclusive Author
  • Has been a member for 4-5 years
theux says

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.

1028 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Author had a File in an Envato Bundle
  • Bought between 50 and 99 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 500 and 999 users
+1 more
ThemeBlvd says

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.

7 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 6-7 years
zennit says

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?

by
by
by
by
by
by