Show blog post comments immediately

If you want blog comments to be published right away, you may need to disable comment moderation.

  1. Click on the Manage blogs button.

    Manage blogs btn
  2. Select your blog.

  3. In the Comments section, select either, Comments are allowed, pending moderation or Comments are allowed, and are automatically published. If you want your comments to show up without being moderated by you or another staff member, then make sure to select Comments are allowed and are automatically published.

    Blog comments section
  4. Click Save.

Why am I not seeing my comment after submission?

Everyone hates spam. So Shopify does everything in our power to protect you from it.

When a comment is submitted, Shopify sends it to a web service to have it analyzed to make sure it's not spam. Once we're sure the comment is fine to publish on your blog, it will appear.

Most themes — but not all — show a “Successfully posted your comment” message after a comment submission. However, they don't display the submitted comment right away, since it has to be checked for spam first. Unfortunately, this can be confusing to your commenters. If you're set on seeing blog comments immediately after posting, you can work around this by having your web developer follow the steps below, or adjusting the code yourself.

Improving the comment workflow

You can edit your article.liquid template to show the comment right away to its author, even though that comment may not be published yet.

When a comment is submitted, the browser is redirected to a page that includes the new comment id in its URL. Example:

When a comment ID is specified in an article URL, the comment is accessible in the template through a Liquid object called comment. That comment is a full-fledged comment variable that has all the regular comment properties, such as content and author: comment properties. Note that comment.created_at will only be defined if the comment did not have any blank field — was posted without error.

To show that comment, edit your article.liquid template to contain that code:

{% if comment and comment.created_at %}
<div class="comment">
... your just-published comment ...
{% endif %}

{% if article.comments.size > 0 %}
... your other comments ...
{% endif %}

As an alternative to getting help, you can replace the content of your current article.liquid template with this code. That file on GitHub is a sensible default template that does the job. Note that you will lose your article page styling when you do that.

Want to discuss this page?

Visit the Shopify Community