10. Single

This chapter is aptly named “Single” because the template theme file used to display a single post is called single.php. The single.php template is used anytime a user is on a post page (or nonhierarchical custom post type). Typically, the difference between the single and page template that powers a single page is additional metadata (dates, author, comment number) and the Comments section.

What you’re about to learn

• Additional Template Tags for pulling post data

• How to display author information

• How to enable commenting on a post

• How to display the comment form and styling the comments template

Post Page Layout

The post template page has a structure similar to the rest of the site (Figure 10.1). The header, footer, and sidebar ...

Get Web Designer’s Guide to WordPress: Plan, Theme, Build, Launch now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.