# Disqus comments problem

**URL:** <https://forum.ghost.org/t/disqus-comments-problem/25005>\
**Category:** Developer help\
**Created:** [August 18, 2021, 4:24pm UTC](https://forum.ghost.org/t/disqus-comments-problem/25005 "2021-08-18T16:24:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicklas\_Fox](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/nicklas_fox/32/14672_2.png) [@Nicklas\_Fox](https://forum.ghost.org/u/Nicklas_Fox)\
**Post date:** [August 18, 2021, 4:24pm UTC](https://forum.ghost.org/t/disqus-comments-problem/25005/1 "2021-08-18T16:24:24Z")

</div>

Did I miss something when editing disqus code? It’s not working, I’m on a hosting company

```auto
<div id="disqus_thread"></div>
        <script>
            /**
            * RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
            * LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables */
            
            var disqus_config = function () {
            this.page.url = https://working.nicklasfox.se; // Replace PAGE_URL with your page's canonical URL variable
            this.page.identifier = 'ghost-{{comment_id}}'; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
            };
            (function() { // DON'T EDIT BELOW THIS LINE
            var d = document, s = d.createElement('script');
            s.src = 'https://nicklasfox1.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">comments powered by Disqus.</a></noscript>

```

---

<div class="post-metadata">

**Author:** ![themeix](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/themeix/32/4472_2.png) [@themeix](https://forum.ghost.org/u/themeix)\
**Post date:** [August 18, 2021, 10:33pm UTC](https://forum.ghost.org/t/disqus-comments-problem/25005/2 "2021-08-18T22:33:00Z")

</div>

Please change these 2 lines,

```auto
  this.page.url = '{{url absolute='true'}}';  
  this.page.identifier = '{{comment_id}}';

```

---

<div class="post-metadata">

**Author:** ![Nicklas\_Fox](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/nicklas_fox/32/14672_2.png) [@Nicklas\_Fox](https://forum.ghost.org/u/Nicklas_Fox)\
**Post date:** [August 19, 2021, 9:08am UTC](https://forum.ghost.org/t/disqus-comments-problem/25005/3 "2021-08-19T09:08:14Z")

</div>

Tried that… and nothing. I’m giving the full post.hbs. Did I miss something?

```auto

{{! Template: Post }}
{{!< default}}

{{#post}}

    <main class="page">

        {{> "post-reading-time"}}

        <article class="post {{#if feature_image}}post-featured{{/if}}">

            {{#if feature_image}}
                {{> "post-cover"}}
            {{/if}}

            {{> "post-flow"}}

            <div class="wrapper">

                {{^if feature_image}}
                    {{> "post-header"}}
                {{/if}}

                {{> "post-main"}}

            </div>

        </article>

        <div class="post-end wrapper">

            {{> "post-footer"}}

            {{#primary_author}}
                {{> "author"}}
            {{/primary_author}}

            {{> "post-comments"}}

            {{> "post-nav"}}

        </div>

        <div id="disqus_thread"></div>
        <script>
            /**
            * RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
            * LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables */
            
            var disqus_config = function () {
            this.page.url = '{{url absolute='true'}}'; // Replace PAGE_URL with your page's canonical URL variable
            this.page.identifier = '{{comment_id}}''; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
            };
            */
            (function() { // DON'T EDIT BELOW THIS LINE
            var d = document, s = d.createElement('script');
            s.src = 'https://nicklasfox1.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">comments powered by Disqus.</a></noscript>

    </main>

    <div class="wrapper">
        {{> "subscribe"}}
    </div>

{{/post}}

```

---

<div class="post-metadata">

**Author:** ![Kevin\_David\_K](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kevin_david_k/32/8003_2.png) [@Kevin\_David\_K](https://forum.ghost.org/u/Kevin_David_K)\
**Post date:** [August 19, 2021, 12:00pm UTC](https://forum.ghost.org/t/disqus-comments-problem/25005/4 "2021-08-19T12:00:25Z")

</div>

**Before you start**

**1.** Make sure you’ve registered your website with Disqus. Read the [Quickstart Guide](https://help.disqus.com/customer/portal/articles/466182-quick-start-guide) for more information.  
**2.** You will need to be able to edit the HTML of the website you are installing Disqus on.  
\*\*3.\*\*To install Disqus, you will need to know your forum shortname as registered on Disqus.

## Embed code

This is the JavaScript embed code that loads and displays Disqus on your site, typically on the individual article or post pages. The **disqus\_thread** ID is where the postbox is loaded, so make sure to include it above the embed script as shown below.

**Note** : Don’t forget to change EXAMPLE to your forum’s [shortname](https://help.disqus.com/customer/en/portal/articles/466208-what-s-a-shortname-).

```auto
<div id="disqus_thread"></div><script> /** * RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT * THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR * PLATFORM OR CMS. * * LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: * https://disqus.com/admin/universalcode/#configuration-variables */ /* var disqus_config = function () { // Replace PAGE_URL with your page's canonical URL variable this.page.url = PAGE_URL; // Replace PAGE_IDENTIFIER with your page's unique identifier variable this.page.identifier = PAGE_IDENTIFIER; }; */ (function() { // REQUIRED CONFIGURATION VARIABLE: EDIT THE SHORTNAME BELOW var d = document, s = d.createElement('script'); // IMPORTANT: Replace EXAMPLE with your forum shortname! s.src = 'https://EXAMPLE.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>

```

## Configuration variables

Within the above embed code, there are configuration variables which tell Disqus how the system should work and behave. EXAMPLE is your [“shortname”](https://help.disqus.com/customer/en/portal/articles/466208-what-s-a-shortname-) and should be replaced to tell Disqus which website account (called a [forum](http://docs.disqus.com/help/8) on Disqus) this system belongs to.

**this.page.url** tells Disqus the location of the page for permalink purposes, this value will also uniquely identify the page and discussion thread if `identifier (below) is not set. The url must contain a protocol (HTTP or HTTPS).

**this.page.identifier** tells Disqus a unique value, used to identify the page and discussion thread

There are many more configuration variables available, but these are the most important. To learn more about these and the other configuration variables, read [JavaScript configuration variables](http://docs.disqus.com/help/2).
