Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I would like to know if creating a Wordpress theme from scratch is good? because I know the template tags in wordpress and other tags ...

...but Will I get any future problems in here when it comes to updating to another version?

Im curious because I rather create one from scratch rather than creating a child theme because I cant modify the single/index/page.php files to create a modified custom loop.

share|improve this question
add comment

2 Answers

Is it ok to not a have child theme and just create a theme from scratch?

Yes of course, you'll just have to cover alot of ground, most developers work from a code base, so even if you're not using a child theme, it does help save alot of time by building on top of a theme framework(there's even minimalist frameworks available). That's not to say you can't code one from the ground-up, you might just be in for more work than you realise.


I personally use a child theme, because it means i have a code base that i can change simply by adding a file or a few lines CSS/HTML, ie. the child theme can selectively override templates or design elements it needs, and leave the rest to be inherited from the parent.

When a request is made, be it for a category or date archive(or whatever else), WP will check if your child theme has a specific template in place for that request, if it does, WP includes the template from the child theme, else it passes the buck to the parent theme.

So let's say for a moment that you request a category listing of posts for the category cakes.

example.com/category/cakes

WordPress will first check to see if the child theme has a category-slug.php(where slug is an applicable category slug) and if not checks the parent theme for a file with the same name. If neither exist WordPress continues working it's way through the template hierarchy(see image below), first checking if the child theme has an applicable template to render the category archive, and again if not checks with the parent theme(moving down the template hierarchy as it goes).

WordPress template hierarchy

The only file required in a child theme is the stylesheet, style.css, anything else is purely optional and only needed if you want to change/restyle that particular kind of request, again be it, category archives, date archives, the index, whatever..

It's explained quite well on the child theme's codex page, worth a read if you've not yet done so.

share|improve this answer
    
perfectly explained. +1! –  kaiser Mar 7 '11 at 16:44
add comment

You can create a child theme AND have it override any of the template php files in the parent theme.

So, as an example, if you want to have a specific page.php and you can't find a way of doing it using actions and filters in your child theme, just create a page.php file in your child theme and this new page.php will be used instead.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.