Single posts and thumbnails

Now we'll take a look at the single post page. Right now, we have this roll of posts from our site, but that's it; we can't click on it and go to the individual post, where we would have our comments and things like that. So let's go ahead and work on that:

  1. Let's go to the index.php file and make the title clickable. We'll add a link to the title. To do this, let's go to the <h3> tag, as shown in the following code; add the <a> tag, and wrap that around the <title> tag:
      <?php get_header(); ?>         <div class="main">            <div class="container">               <?php if(have_posts()) : ?>                  <?php while(have_posts()): the_post; ?>                     <h3>                     <a href="<?php the_permalink(); ?>">                        <?php the_title(); ?>                     </a>                     </h3>                     <div class="meta"> Created By <?php ...

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.