Want to skin your wordpress blog (weblog)? WordPress theme system is there. Skinning the theme? Yes it’s like look and feel. Only design is changed in wordpress theme that refers to skinning wordpress blog. WordPress theme is flexible enough in the way to not only providing the design and presentation of the website but also the database control over the theme. It’s just a collection of files connected together to build a graphical interface. Template files are the files showing this presentation. Without changing the core files, these template files are there working separately on the basis of hook architecture – the supporting architecture of wordpress. There are number of file types included in the new customized template like php (with naming like *.php), cascading style sheets (named as *.css) and supporting images (*.png, *.gif, *.jpg etc).
One way of learning theme coding in wordpress is to modify the built-in theme Twenty Ten, Twenty Eleven or Twenty Twelve by changing the div placements and adding content there in the theme files. But before digging deep into it some basics like the theme files structure is required. WordPress theme, at least, consists two files index.php (having the template i.e. html) and a style.css (basic theme styles are defined here). If the theme is child type then one style file is sufficient in the theme directory, no template files is then required as the template is inherited from the parent file. Maximum number of files varies as per the requirement. Conventional wordpress site with four main blocks i.e. header, footer, sidebar and main content will have an optimal 6 number of files.
All the built in wordpress themes are contained in wp-content/themes directory. Same directory will be used for placing the custom themes. For creating a theme from scratch, just create your directory, for instance named first_theme, in wp-content/themes/ directory and place the following blank files in the directory: index.php (main file to control display), header.php (top information like menu of the web page that is to be repeated in all web pages), sidebar.php (left or right block content need to be there throughout site), footer.php (bottom content with navigations or copy write related information), functions.php (repeated functionality i.e. php custom functions are defined here), and style.css (as name sound it – all of the site style is residing in this file). And now start tracing the code from any of Twenty Ten, Twenty Eleven or Twenty Twelve and record your experiment.
Let’s move on and play with your theme but don’t forget to mention how you find playing with wordpress interface?