# Disable Disqus comments on preview?

**URL:** <https://forum.ghost.org/t/disable-disqus-comments-on-preview/4683>\
**Category:** Developer help\
**Created:** [December 26, 2018, 4:37pm UTC](https://forum.ghost.org/t/disable-disqus-comments-on-preview/4683 "2018-12-26T16:37:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nehalist](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/nehalist/32/1867_2.png) [@nehalist](https://forum.ghost.org/u/nehalist)\
**Post date:** [December 26, 2018, 4:37pm UTC](https://forum.ghost.org/t/disable-disqus-comments-on-preview/4683/1 "2018-12-26T16:37:35Z")

</div>

Hi,

is there a way within the `post.hbs` to get the information if this post is a preview? I’m having serious problems with my disqus comments since the entire URL mapping seems to be wrong due to previewing posts before publishing them (eg see [https://nehalist.io/dell-xps-15-9570-i9-developer-review/](https://nehalist.io/dell-xps-15-9570-i9-developer-review/) - none of the comments below belong to this post (Edit: fixed for this post by re-publishing it with new slug)).

Since the Disqus support consists of ~1 guy support for this topic has been going for multiple months - they helped to correct previous incorrect comment sections, but every time I release a new one the comments are f\*\*\*ed up. Afaik the easiest way to solve this issue is to disable comments for previews.

Is this possible (in Ghost 1.24.x)?

Thanks

---

<div class="post-metadata">

**Author:** ![vikaspotluri123](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vikaspotluri123/32/24_2.png) [@vikaspotluri123](https://forum.ghost.org/u/vikaspotluri123)\
**Post date:** [December 26, 2018, 6:37pm UTC](https://forum.ghost.org/t/disable-disqus-comments-on-preview/4683/2 "2018-12-26T18:37:44Z")

</div>

You’re looking for the [is helper](https://docs.ghost.org/api/handlebars-themes/helpers/is/) - it executes based on whether or not you are in a certain context.

So you can do something like this:

```plaintext
{{#is "preview"}}
    {{!-- The post / page _is_ a preview --}}
    <strong>You're vieiwing a preview of this article - please don't share it!</strong>
{{else}}
    {{!-- The post / page is _not_ a preview --}}
    Thanks for reading! Leave a comment?
{{/is}}

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/b/ba9ce5100b8bb264586f4f572545596b2ce3f081.png) [@system](https://forum.ghost.org/u/system)\
**Post date:** [January 9, 2019, 6:44pm UTC](https://forum.ghost.org/t/disable-disqus-comments-on-preview/4683/3 "2019-01-09T18:44:28Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
