Disable Disqus comments on some pages

I found a old post that said using this line of short code in {{ if and (not (eq .Site.DisqusShortname "")) (not .Params.disable_comments) }}
the disqus.html would disable the comments on some pages.

it sort of worked but now the disqus shortname isn’t loading. originally my short code started with this {{ with .Site.DisqusShortname }} is their some way to fix it or do i need to rewrite my disqus.html

My answer for a similar question: How to disable comments in specific pages?