In the previous lesson we covered the general WordPress directory structure, created the required folder and files and pasted in the minimum code in the “style.css” file to define the theme in the admin section. In this lesson we will begin the process of building the style sheet.
Methods of Styling (Method One)
There are various ways to approach this and I’m going to talk about the pros and cons of each. The first method or approach is to import the parent theme and then create overrides to the parent theme. Below you can see the import method used to bring in the default parent theme.
1 2 3 4 5 6 7 8 9 10 11 12 | /* Theme Name: Generic Theme URI: http://www.xxx.com/ Description: A Twenty Ten Child Theme. Author: Your Name Author URI: http://www.xxx.net/ Template: twentyten Version: 0.0.1 Tags: some, tags, to, describe, the, theme */ @import url("../twentyten/style.css"); |

When I first started to develop themes with WordPress, the first thing I did was to take the default WordPress theme and edit it to fit my needs. This later led to editing other people’s themes and eventually I started to develop my own themes from scratch. This process led me to understand what the core structure of WordPress is and how themes function. Since then I have learned that there are better and easier ways to develop themes .