Chapter 3, Coding it Up

Pop quiz – questions about WordPress theme structure

Q1

1. Only the first statement is true—page.php trumps index.php when viewing a static page. When viewing a category archive, it's category.php that trumps archive.php (not the other way round). single.php trumps index.php when viewing an individual post or attachment—it isn't used for viewing static pages.

Q2

3. The header.php file contains everything from the opening the DOCTYPE declaration to the end of the header in the design, which is generally the end of the <header> tag (or the end of the main <nav> tag).

Q3

All three. The files which most commonly contain widgets are sidebar.php and footer.php. However, there is no reason you couldn't add widgets to header.php—they can be useful if you want a widget area in your header or above your content.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset