How to insert comments to your posts and other pages using Disqus in Shopify
Drive 20-40% of your revenue with Avada
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
- Step 2: Create a
disqus.js
file and save it - Step 3: Paste into layout
- Step 4: Set url
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.