$show=home$hide=mobile-page

Load Disqus Comments on Demand

Tutorial on how to setup Disqus Comment system on Wordpress to load on demand.

Tutorial on how to setup Disqus Comment system on Wordpress to load on demand
Most WordPress sites use Disqus as their commenting system. The easiest way to implement Disqus on your website is to use their plugin.

Since Disqus loads asynchronously, your web page load speeds are not affected. However, Disqus downloads required files to the user’s system, which adds the weight of posts/pages where you have implemented Disqus codes. This costs your users their valuable bandwidth.

There are numerous other posts on internet related to the topic. The one I liked the most is from Labnol. However, in his post he didn’t mention how to dynamically get post url, post ID etc. We bring you a code snippet that you can place in your theme’s “functions.php” file.


STEP 1

Place the below code in your theme’s “functions.php” file or your site-specific plugin. Remember to change the short name from “aneejian” to your Disqus short name - line highlighted in code
var disqus_shortname = "your disqus short name";


STEP 2

Place the below code where you want Disqus to load. This will show a link “Load Comments” where you have placed the code. Clicking the link will load comments.
You can place it in your theme’s “comments.php” file or “single.php” file or you can use a plugin that can insert codes to your post/pages.


COMMENTS





Name

AngularJS,3,Automation Testing,8,CSharp,5,Disqus,1,Excel,2,HP ALM,5,HTML5,1,ISTQB,2,Java Script,2,Manual Testing,7,Photography,1,Quiz,2,REST API,5,Testing,15,UFT,8,VB,5,VBScript,1,Wordpress,1,
ltr
item
Aneejian: Load Disqus Comments on Demand
Load Disqus Comments on Demand
Tutorial on how to setup Disqus Comment system on Wordpress to load on demand.
https://4.bp.blogspot.com/-mJB6kQmHAGY/WMf12GI1icI/AAAAAAAAAEw/MMaMSagj3fgPQrP4CvFgmnYV8c-xDcr_gCLcB/s320/featured%255B1%255D.png
https://4.bp.blogspot.com/-mJB6kQmHAGY/WMf12GI1icI/AAAAAAAAAEw/MMaMSagj3fgPQrP4CvFgmnYV8c-xDcr_gCLcB/s72-c/featured%255B1%255D.png
Aneejian
http://www.aneejian.com/2015/06/load-disqus-comments-on-demand.html
http://www.aneejian.com/
http://www.aneejian.com/
http://www.aneejian.com/2015/06/load-disqus-comments-on-demand.html
true
5798203121010168414
UTF-8
Loaded All Posts No posts found VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU ARCHIVE SEARCH ALL POSTS No post found which matches with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy