The post loop
In the previous section, we created the header and footer files and included them in the index.php
file. In this section, we will work on the main post area. So far, we have a bunch of static HTML which we need to change. We will have two types of posts:
- Regular post: This will be a standard blog post with a title and paragraph
- Gallery post: This will have the image with the description underneath
We will add support for content or post formats. So what we need to do is create a functions.php
file inside our photogenik
theme.
Adding the theme support function
We will create a function to set up certain support for our theme. For instance, to be able to use the featured image or thumbnails. In function.php
, we'll add a comment Theme Support
and declare the theme_setup
function as shown here:
<?php // Theme Support function theme_setup(){ }
Now, when we go to a post as shown in the following screenshot, we don't have a Featured Image
box below the Tags
section. That's what we will...