We've made many changes to customize a theme in this chapter, and now we are ready for a detailed overview of exactly how the theme controls the appearance of a page.
The theme doesn't start the page output. The page output process is started by the module that is currently in action at that point. Every part of every module that wants to display a standard page will have code like this:
include("header.php"); ... include("footer.php");
Page output actually starts in a function called header()
, which is in the header.php
file. The module won't call this function directly; within the header.php
file is the call to the header()
function, and simply including the file will get things started.
First of all, the header()
function creates the META
tags and TITLE
tag, adds links to the required stylesheet (this is by default the style.css
file in the style
folder of the current theme), and opens the HTML
tag.
Now the fun really starts. header()
now makes the first...