html - What am I doing wrong with trying to get my Disqus plugin to work? -
i'm building website , it's saved on desktop right now. i'm trying place disqus
on 1 of pages , pasted code in html document , i'm not getting on page. able twitter widget work on different page pasting code given me , same type of instruction given disqus
paste universal code site nothing showing up.
do have css file showing? searching through settings in disqus
, 1 of settings allows me set website url website not live , located in folder in desktop containing html , css files.
i created test html document in folder containing html documents sentence contained in paragraph tag.
<! doctype html> <html> <head> <title>test-disqus</title> </head> <body> <p> testing disqus.</p.> <div id="disqus_thread"></div> <script type="text/javascript"> /* * * configuration variables * * */ var disqus_shortname = 'myusername'; /***changed question*/// /* * * don't edit below line * * */ (function() { var dsq = document.createelement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getelementsbytagname('head')[0] || document.getelementsbytagname('body')[0]).appendchild(dsq); })(); </script> <noscript>please enable javascript view <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered disqus.</a></noscript> </body> </html>
a couple of issues html, it's not root cause of issue.
1) it's <!doctype html> not <! doctype html>
2) closing paragraph tag has ".", should </p> , not </p.>
you said, "i'm building website , it's saved on desktop right now." if you're opening test file directly desktop using web browsers, disqus module not load. disqus restricts comment module load on trusted domains set you. can check trusted domain logging disqus -> admin -> settings -> advanced.
you can add additional trusted domains if need. if trusted domain "xyz.com" , load test page desktop, trusted domain not match.
you need run webserver working, recommend mamp local development. mamp start on port 8888 or 8080. allow access test file going http://localhost:8080/test.html. after can try adding localhost trusted domain, or create entry in host file.
Comments
Post a Comment