Skip to main content

Create a Forum on a Static Page with Disqus

Creating a Forum on a Static Page with Disqus - ProAdsense Forum is quite simple by utilizing Disqus, and visitors can make posts or comments and can also answer posts or comments of blogger friends.

In addition to being a forum, its existence can also be used as an out of topics column. And it turns out that there are some bloggers who are interested also to create a forum like this on his blog.

Forum on Static Pages with Disqus

To that end, I share how to create a Forum on a Static Page with Disqus for those who want to try it on their blog. If your blog does not display Disqus comments on static pages, please use the code below to display Disqus on static pages.

For non AMP Blog

<div id='disqus_thread'></div>
<script>
var disqus_config = function () {
this.page.url = 'URL OF THE PAGE HERE';  // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
this.page.title = 'PAGE TITLE HERE';
};
var shortname = 'SHORTNAME DISQUS HERE';
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = 'https://'+shortname+'.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>

Please adjust the code marked according to the URL and title of the page used for the forum, and also customize the Disqus shortname.

For AMP HTML Blog

<amp-iframe frameborder="0" height="1000" layout="fixed-height" resizable="resizable" sandbox="allow-forms allow-scripts allow-same-origin allow-modals allow-popups" src="https://cdn.statically.io/gh/KompiAjaib/kompi-html/master/ampdisqus_blogger4.html?shortname=proadsense&amp;fontBodyFamily=sans-serif&amp;fontLinkColor=2B0C93&amp;canonicalurl=https://www.proadsense.eu.org/p/forum-proadsense.html&amp;title=Forum%20Proadsense" title="Disqus Comments">
  <div aria-label="Disqus Comments" overflow="" role="button" tabindex="0"></div>
<amp-img height="1000" layout="fixed-height" placeholder="" src="https://cdn.staticaly.com/img/1.bp.blogspot.com/-x1yVa6ztsWY/WyHFPLG0uLI/AAAAAAAAyIg/3C5Lb5EjGywOPzO_XSwK1XTu6VlBZE4SgCLcBGAs/s1600/back-iframe.png" width="auto"></amp-img>
</amp-iframe>

Please adjust the code marked according to the URL and title of the page used for the forum, and also customize the proadsense shortname with the shortname Disqus blog.

Hopefully useful.

Comment Policy: Silahkan tuliskan komentar Anda yang sesuai dengan topik postingan halaman ini. Komentar yang berisi tautan tidak akan ditampilkan sebelum disetujui.
Buka Komentar