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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access