Add Comments to Shopify Sites
With FastComments we can easily add live commenting to any Shopify site.
The instructions below are for a blog built on Shopify, but the embed code can also be manually added to any page by editing other theme files. FastComments Support can also assist with this.
Note that this tutorial requires a FastComments account. It's recommended that you sign up first and then come back here. You can create an account here.
Step 1: Disable Default Commenting System
The first step to using FastComments with Shopify is disabling Shopify's system.
Note FastComments Support can assist you in migrating over existing comment threads.
To replace the Shopify comment system, we'll go to our store dashboard and click
Blog posts in the bottom left:
Then we will click
Manage blogs in the top right:
Click on the blog we want to manage. If it says
Comments are disabled you can skip this step and move to
If not, select the blog and ensure
Comments are disabled is selected in the right panel:
Now click save.
Step 2: Open The Blog Theme Template
Now we're going to edit our store's theme to add FastComments.
In the left panel, open
Current theme, select
Actions and then
This will open up a code editor, with a file browser on the left and the code on the right.
All we need to do is copy a small piece of code that adds FastComments and paste it on the right line in the right file.
In the file browser on the left, scroll down and click
Now we're going to scroll down and select
This will open the theme template used to render a single blog article.
You should now see something similar to the following, with
main-article.liquid selected at the top:
Step 3: Add The FastComments.com Code
Next we're going to scroll down to line
Now copy the following code snippet, which is designed specifically for Shopify - do not use code snippets from other tutorials:
Now we want to put our cursor on
line 101 - right after the
</div> - and paste. You should have something like this:
Now we can save:
Now if we view a blog post, we should see FastComments!
Congratulations on setting up FastComments with Shopify! If you've run into a Domain Error, or would like to learn how to customize the comment area, read on!
You may get an authorization error, like the following:
This is because FastComments doesn't know it's supposed to allow your account to be used on this domain.
In this case, the fix is simple. We just have to add our site to our FastComments.com account.
FastComments is designed to be customized to match your site.
If you'd like to add custom styling, or tweak configuration, Checkout our Customization Documentation to learn how.