What i was doing previously, are as follows –
- I copy the wordpress base theme (like twentytwelve in wordpress 3.5)
- Rename the folder and converted index.html of my HTML to index.php for wordpress theme.
- Replace style.css with my current style.css.
Is it the right way of theme development or some else better technique can be applied for theme development ?
I google a lot for the theme development but 99% tutorials are only using index.php , style.css only(some only header/footer etc) although in the new version of wordpress 3.5 twentytwelve I found there are too many files in the theme.
So for the client case I dont want to leave any core theme functionality provided these dummy themes, so is it the correct way I am following or for the best way I need to design and code for each file ?
I like to do this as follows:
This way you will have a clean template to start with, and no core theme functionality provided by the theme you decided to use as a dummy.
I don’t know exactly if there is any “right” way to build your own theme, only that the Codex insist you use the WordPress Coding Standards, CSS Coding Standards and that you follow the design guidelines.
I think that, except of the parts of the Codex a developer is free in how to develop a theme.
Did you read official codex documentation about theme development?
Anyway here are some points to note
functions.php
A theme can optionally use a functions file, which resides in the theme subdirectory and is named functions.php.
This file basically acts like a plugin, and if it is present in the theme you are using, it is automatically loaded during WordPress initialization (both for admin pages and external pages)
Template Files List
Here are some resources for faster theme development
If the only difference between your new theme and the twentytwelve theme is the
index.php
andstyle.css
files, then you could use a child theme that is based on the twentytwelve theme.Then you don’t need to copy the twentytwelve directory, instead, you create a new directory with your theme name, put your
index.php
andstyle.css
files in it, and just make sure that your style.css file’s header hasTemplate: Twenty Twelve
written in it