Skip to content

Instantly share code, notes, and snippets.

@jennschiffer
Created July 1, 2015 20:56
Show Gist options
  • Save jennschiffer/493d94f30f0bc751dca3 to your computer and use it in GitHub Desktop.
Save jennschiffer/493d94f30f0bc751dca3 to your computer and use it in GitHub Desktop.
disqus of nanoc posts in wordpress theme
<?php
/**
* The template for displaying comments
*
* The area of the page that contains both current comments
* and the comment form.
*
* @package WordPress
* @subpackage Twenty_Fifteen
* @since Twenty Fifteen 1.0
*/
/*
* If the current post is protected by a password and
* the visitor has not yet entered the password we will
* return early without loading the comments.
*/
if ( post_password_required() ) {
return;
}
?>
<div id="comments" class="comments-area">
<section class="post-comments">
<h2>Comments</h2>
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'bocoup';
var disqus_identifier = 'http://bocoup.com/weblog/' + '<?php echo $post->post_name; ?>';
var disqus_url = 'http://bocoup.com/weblog/' + '<?php echo $post->post_name; ?>';
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + 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>
</section>
</div><!-- .comments-area -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment