Disqus comments fails to load on localhost?

情到浓时终转凉″ 提交于 2019-11-28 06:19:33

you should set this to make it work:

var disqus_developer = 1; // this would set it to developer mode

Reference: http://ray247.wordpress.com/2009/09/02/how-to-develop-with-disqus-on-localhost/

None of the solutions above worked for me as of September 2013.

To get it to work I had to add localhost to the "Trusted Domains" list on this page:

http://[disqus_shortname].disqus.com/admin/settings/advanced/

and also use the "Universal Code" found below to embed it into my blog posts:

http://[disqus_shortname].disqus.com/admin/settings/universalcode/

And it works! :)

Try setting disqus_url to match your registered site URL.

http://kenhirakawa.com/load-disqus-on-localhost/

The recommend solution seems to be to register multiple shortnames aka sites. This worked for me. E.g., balloons and balloons-dev.

Make sure to modify the Javascript they give you to replace the shortname in the line which is below the comment about "do not modify", if want to dynamically set which site you're using based on your environment (e.g., "balloons" if not settings.DEBUG else "balloons-dev").

https://help.disqus.com/customer/portal/articles/1053796-best-practices-for-staging-development-and-preview-sites

Disqus doesn't work on localhost as far as I know. It has always only worked on the production site for me. I believe it checks the hostname against the registered hostname.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!