Default Disqus embed code includes the following:

var disqus_config = function () {
    this.page.url =   // Replace PAGE_URL with your page's canonical URL variable
    this.page.identifier = {{ entry.section }}-{{ entry.id }}; // Replace PAGE_IDENTIFIER with your page's unique identifier variable

I am trying to use this.page.url = {{ entry.url }}. This prints the url, but it includes the http:// and the : is throwing an error preventing Disqus from loading. Is there anyway to template the url without the http://????

Note that the config I am using is straight from Disqus. The CraftCMS knowledge base article does not include this-page.

1 Answer 1


Try wrapping your entry.url in quotes so JS reads it as a string.

this.page.url = '{{entry.url}}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.