How to Add Comments to Your Ghost Theme

Posted on February 2nd, 2025

Encouraging readers to share their thoughts directly on your articles can boost engagement and help build a community around your content. Ghost makes this process simple by working with different commenting platforms, so you can choose one that fits your publication’s needs.

You’ll find easy-to-follow guides to set up your preferred commenting system with Ghost. This tutorial will show you how to connect popular commenting platforms to your Ghost site. Allowing comments creates a space for discussion and feedback, making your articles more interactive for your audience. Let’s begin the process of building a lively community around your content!

Add the Code

Open your theme in the code editor and find the post.hbs file.

If you’re using Casper, you’ll see a section of code starting at line 76 that looks like this:

<!–
<section class=”article-comments gh-canvas”>
If you want to embed comments, this is a good place to paste your code!
</section>
–>

Other themes may have different setups. For instance, the Ease theme in Ghost uses a file called comment.hbs. Regardless of these differences, the main point is to find the spot on your post page where you want the comments to show up, usually right after your main content.

Next, you need to add the code for your commenting platform in that spot in post.hbs. Check our other tutorials for more details on how to do this, or follow the instructions from your chosen commenting platform.

After you add the commenting code, compress your theme files into a zip file and upload them to your Ghost site.

Connect and Verify

Make sure the commenting tool is working by testing it out yourself. Go to one of your published posts and leave a comment—maybe something nice about your publication! If your comment shows up as it should, you’re all set!

Members Only

With Ghost, you can choose a commenting platform and also limit access to your publication’s members. You just need to add one extra line of code.

By wrapping your comments section with the access helper, you can make it so only members can leave comments.

{{#if access}}
<!– Your commenting service –>
{{else}}
<p>You’re missing out on the conversation. Become a member and join in.</p>
<a href=”#/portal/”>Subscribe</a>
{{/if}}

Conclusion

Great job! You’ve added commenting to your Ghost site just for your special group of members. This change helps people connect and makes your community feel more personal.

If you want to keep chatting, come join our Forum, where fun discussions are happening all the time. Meet others who think like you, share your thoughts, and join in on the conversations. This is just the start of building your community, and we’re excited to see all the connections and talks that will grow. Keep the conversation alive and enjoy engaging with others!

Leave a Reply