Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Cesar Vanbuskirk
Cesar Vanbuskirk
6,672 Points

When creating your own theme is it better to create the site first in HTML and CSS then convert it to wordpress?

Not sure what is the correct way to go about creating your own wordpress theme? Is it better to create the site in HTML and CSS then convert maybe by using a starter theme or is it better to start with the index.php, style.css, functions.php then slowly create it while adding the necessary files?

ryan95
ryan95
8,964 Points

As far as I know, you generally want to sketch it out on paper, then come up with a static version and plug in all your WordPress necessities at the end. That way you can visualize the site from start to finish, and make minor changes along the way.

1 Answer

It depends. When designing from scratch I find it easier to discuss the scope and draw a layout on a legal pad. Then I split that into header, front-page, page, and footer. As for CSS, I generally start with a framework like bootstrap or foundation and then make adjustments on style.css. You could write them up in HTML if you'd like, but you'll eventually port repetition to PHP wherever possible.

Honestly, if you are familiar with a framework like Genesis and the themes that work with it at studiopress, the layout on your legal pad might look a lot like a theme that already exists. If you know how to do theme development, you can usually find a theme that has most of what you want and just add custom features.

Whether you go from scratch or customize an existing theme, I would highly encourage Zac Gordon's class on building a wordpress theme if you haven't already taken it. Brilliant overview of the different pieces of a wordpress theme.

Cesar Vanbuskirk
Cesar Vanbuskirk
6,672 Points

thanks buddy just what I was looking for

Cesar Vanbuskirk
Cesar Vanbuskirk
6,672 Points

Oh! One more thing, could you tell me why I would use a genesis instead of a regular theme + child theme? I feel like genesis limits you a lot on theme choices and can't see the benefit of that over a regular free theme.

In one word, longevity. Full disclosure, Genesis is a personal preference of mine and the rest of this will be my opinion with facts about StudioPress sprinkled in. As an out of the box platform, the Genesis Framework allows:

Responsive HTML5 Simplified SEO settings Unlimited installs Great support Unlimited updates Security standards

Wordpress is awesome. Free themes are one example of the amazing things available to the wordpress community and I'd encourage you to take full advantage of them.

...BUT...

Wordpress sites get hacked constantly. It's a byproduct of the design and an accepted risk with open source projects. Generally speaking, a good way to avoid software vulnerabilities is to keep things up to date. Wordpress, theme developers, and plugin developers all tend to work independently of one another and release updates at their leisure. These updates may conflict with one another or cause vulnerabilities on occasion. It's possible to put yourself in a position where you cannot update your site to the latest version of wordpress without losing theme functionality (or outright crashing your site). <- That's a bad spot to put yourself in. Client's don't tend to enjoy it either.

Genesis however will remain update tolerant, secure, and supported for the foreseeable future and they offer support when these types of issues arise. You can easily pull features from free themes and build them into a child theme on Genesis too.

If you have the time, Jesse Peterson has a great intro to the nuts and bolts of Genesis: http://teamtreehouse.com/library/genesis-framework-foundations

Hope this helps!