Let's take a look at a few different things now. We'll look at post types or post formats. Right now, if we look at our theme, we have just basically one kind of post, and it's just a standard blog post. We can also have things, such as galleries, links, images, and quotes status updates, and we can format these different types of posts in different ways. We will now see how to do that, how to add these to our theme. Also, we'll look at a function called get_ template_part(), which allows us to stop repeating ourselves. For instance, if we look at our index page, we have while (have_posts()), and then we're just outputting our post. We observe the same thing in the archive, in search.php, and so on. So we want something ...
Different post formats
Get Learn to Create WordPress Themes by Building 5 Projects now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.