Single Post and Page Template
Discover what type of content is displayed on a web page based on the theme file being used.
We'll cover the following...
Template files
The index.php
file powers the homepage. The code in the previous lesson lists the 10 most recent blog posts. If we visit the page of a single blog post, we need it to display the content slightly differently. Specifically, we do not need the title to be a link anymore because we are already on the detail screen and it makes no reason to click the title again. Also there is no need to display the horizontal rule for separation as there is just one post on this page.
Press + to interact
The single.php
file
In a theme, we have different files that display different pages. The file named single.php
is responsible for displaying an individual post.
Create a file named single.php
inside the ...