In WordPress, the theme is a set of files that manages the production of HTML code, and finally, the layout and appearance of all the components used to produce any page. The content itself is completely separated and located in the MySQL database.
Figure 1 is an example showing the structure of a theme. The path to the theme (called rocheblog in fig.1) is as follows :
The folder « your_theme » consists of :
- a « style.css » file that manages the layout of the site and the different styles of content
- a set of *.php files which are « templates »
- a « picture » folder containing background images, logos, etc ...
- a « screenshot.png » file which gives an overview of the theme
When you install WordPress (version 3.5.1), you can choose one of the three following themes :
For example, consider first : twentyten (see Figure 2 - click to enlarge).
Let us see how this theme is identified. We have :
- the screenshot image that gives a visual idea of the theme : sreenshot.png(size 300 x 225px)
- the name of the theme : Twenty Ten here
- the author of the theme : WordPress team here
- the theme version : 1.5 in this example
- a brief description of the theme
The four theme identifiers mentioned above are read by the « WordPress engine » in the header of style.css file, as shown in Figure 3.
Are added the url of the site which proposes the theme (Theme URI), the website of the author of the theme (Author URI), and the type of license with the corresponding url.