Transcript
Introduction
In this lesson we will briefly discuss how comments are displayed when you’re using a block theme. Before going to the back end of our website, let’s see how comments display when people respond to a blog post. When I visit the front end of my website, I will click on one of my blog posts. When we go to the bottom of the post, we will notice three people have already responded by adding their comments: Roger, Tina, and Ross. Below that is a section for more people to have their say.
Advantages of allowing comments
Allowing comments on your site has many advantages. It lets you deepen your relationships with readers and discover what interests them. It also increases the likelihood of them subscribing to your newsletter or purchasing something. Essentially, allowing comments can help you build a community around your blog. It is essential to manage comments effectively by using WordPress’s built-in settings under discussions in your dashboard and installing an anti-spam plugin. You can also check out our video about managing spam.
The single template and comments block
The Comments block is generally added to the single posts template. Let’s make our way to Appearance and click on Editor. Then, open up templates and select the single template or the single posts template. As we can see, our single template consists of a header, a Content block, and then a Comments block. And right at the bottom, a footer. When we open the List View, we will have a clearer picture of all the nested blocks. And within the Group block, we will see the Comments block. Have you ever wondered what will happen if you delete the Comments block? All comments on all blog posts assigned to this template will disappear on the front end of your website. So, be careful not to delete this block.
To put it all in context, when I open up one of my posts, in this case, The World is Your Oyster, we will see the post on the left, and on the right, next to templates, we will see this post has been assigned to the single template. When I open the post on the front end of my site, I will see the structure that the template provides and the Comments block. But what if you wanted to display comments on one of your pages? You can open up the sidebar settings, and below Discussions, select Allow comments.
Latest comments block
To end off, I also wanted to mention the Latest Comments block. The Latest Comments block allows you to display readers’ most recent comments on your blog. Let’s add this block to my home page to show you how it works. So, below ‘Feedback from our readers,’ I will add the Latest Comments block. To clarify, the block is not to add comments but to display the latest comments readers have made across your entire site. Each comment links to its original post, when it was left, and who left it. You can use your sidebar settings on the right to style the block further.
Conclusion
May you utilize the comments block to build a strong community or following on your site through feedback and dialogue.
Resources
- Managing spam on your website (opens in a new tab)