Twitter Linkedin Facebook

Add Comments

Easily add Disqus comments to Smart theme without modifying a single line of template code.

Add Comments

Add the comment system of your choice by modifying the post.hbs file.

  1. Download the theme
  2. Unzip the theme archive (
  3. Open the post.hbs file in a text editor
  4. Find the the comment where it says "Add comment code here," near the bottom of the file (line 174)
  5. Replace the comment, {{!-- Add comment code here --}}, with the embed code specified by your comment provider
  6. Save the file and zip up the theme files
  7. Upload the new zip file to your site
  8. Comments should now be enabled on all posts!

Alternative method for Disqus users

This method allows you to add Disqus comments to your site without modifying any theme files. While this method will work, the above method is better for performance and reliability.

Simply paste the code below into your site's Code Injection > Footer. Be sure to update the shortname variable to correspond to your site!

    function addComments() {
        const commentSection = document.querySelector('.sm-comments');
        if (commentSection) {
            commentSection.setAttribute('id', 'disqus_thread');
            const d = document, s = d.createElement('script');
  			s.src = 'REPLACE WITH YOUR';
  			s.setAttribute('data-timestamp', +new Date());
  			(d.head || d.body).appendChild(s);