Home > Shopify Development > How to insert comments to your posts and other pages using Disqus

How to insert comments to your posts and other pages using Disqus in Shopify

Sam Nguyen
Sam Updated: February 28, 2024

Share:

Drive 20-40% of your revenue with Avada
avada email marketing

If you’re looking to enable comments on your Shopify posts and other pages, using Disqus is a great option. This tool allows visitors to engage with your content, share feedback, and create discussions. In this post, we’ll explain how to easily insert comments to your posts and pages using Disqus, making it simple to build an interactive community on your Shopify store.

Table of Contents

Step 1: Create a Disqus account

Firstly, the admins have to register their sites with Disqus site. By signing up an account, the users can have one of the most effective tools for their online stores

Step 2: Create a disqus.js file and save it

In this step, admins just need to coppy this bellow code named Universal code to load Disqus


<div id="disqus_thread"></div>
<script>
  var disqus_shortname = '{{ site.disqus_shortname }}';
  var disqus_config = function () {
    this.page.url = "{{ page.url | prepend: site.url }}";
    this.page.identifier = "{{ page.id }}";
  };

  (function() {  // DON'T EDIT BELOW THIS LINE
    var d = document, s = d.createElement('script');

    s.src = '//' + disqus_shortname + '.disqus.com/embed.js';
    s.setAttribute('data-timestamp', +new Date());
    (d.head || d.body).appendChild(s);
  })();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>

Step 3: Paste into layout

After coppying this code, the users continue by pasting it into their post layout.

Step 4: Set url

Finally, it is necessary for the users to build url to their website’s domain. Then change the disqus_shortname to their own shortname in _config.yml.

...
url: http://mysite.com
disqus_shortname: YOUR_DISQUS_SHORTNAME

Conclusion

To wrap up, adding Disqus to your Shopify store is a simple and effective way to engage your audience and drive meaningful interaction. By following the steps outlined, you can easily integrate Disqus into your Jekyll site and start building a community around your products. Take advantage of this powerful tool to encourage discussions, keep visitors returning, and grow your store’s success with ease.


Sam Nguyen is the CEO and founder of Avada Commerce, an e-commerce solution provider headquartered in Singapore. He is an expert on the Shopify e-commerce platform for online stores and retail point-of-sale systems. Sam loves talking about e-commerce and he aims to help over a million online businesses grow and thrive.

Stay in the know

Get special offers on the latest news from AVADA.