Displaying the post content
In this section, we'll work on the content pages, both the regular post content and also the gallery.
Adding a regular post content
For adding a regular post, we'll start with the content.php
file in the editor. We'll add title, metadata, thumbnail, and lastly, the main content to the post. To start with, we will create an article
tag and give it a class of post
:
<article class="post"> </article>
Adding a title to the regular post content
Next, we need the title. We will put the title inside of an <h2></h2>
tag. We can get the title by adding <?php echo the_title(); ?>
:
<article class="post"> <h2><?php echo the_title(); ?></h2> </article>
Just to check, reload the main page and you can see with the regular content posts we actually get the title:

Adding metadata
Next, we will add the metadata. Let's put that in a paragraph with a class called meta
as shown here:
<p class="meta"> </p>
In the meta
class...