Answer the question
In order to leave comments, you need to log in
How to set up disqus comments?
How to properly set up disqus comments?
There is a code example like this:
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'my-short-name'; // required: replace example with your forum shortname
var disqus_identifier = '[*id*]';
var disqus_title = '[*pagetitle*]';
var disqus_url = '[(site_url)][~[*id*]~]';
/* * * DON'T EDIT BELOW THIS 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 to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
var disqus_shortname
- it does not work! yii2
and want to get the title I do: var disqus_title = <?= $post->title?> ;
(that is, the title of the post), similarly with id: var disqus_identifier = <?= $post->id?>';
(id of the post in the database) Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question