The comment functionality

The last thing we need to do is add some comment functionality to our single post page:

  1. Let's go into single.php and go down. What we want to do is still within the panel body so that ends where it is shown.
  2. Let's create a comment template and add comments_template():
         <?php endif; ?>         <?php comments_template(); ?>      </div>
  1. We'll save that and create a new file. We'll save it as comments.php.

That needs to be in your theme folder, and then if we go ahead and type something in here, we'll say TEST.

  1. If we save and reload, and you can see we're getting TEST:

Now let's create a div with a class of comments and add ...

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.