The post loop
So until now we went ahead and set up our core template, core theme, with an index
, a header
, and a footer
file. We have also implemented the main post loop, but we don't have anything else. We just have the title; we need to fix that.
But before we do that, we need to make it so that we can actually add images to our posts.
This is because right now if we go and we try to add a new post, we don't have a Featured Image
area:

The Featured Image area
For the Featured Image
area to show we need to create a functions.php
file:
- Let's create a new file and call it
functions.php
. Then let's create a functiontheme_setup()
. Now, let's add a commentFeatured Image Support
and also addadd_theme_support()
with the valuepost-thumbnails
:
<?php function theme_setup(){ // Featured Image Support add_theme_support('post-thumbnails'); }
- Underneath the function declaration, we will place
add_action()
and then pass in the hook that we want, which is going to...