Hello,
I’m trying to load Disqus lazily on my Genesis framework powered wordpress installation using javascript I found on a website which I’ve tried inserting in my header and footer afterwards:
http://codepen.io/anon/pen/doWaER
Then I used the Genesis hooks and add it to my functions.php:
/*** Disqus Comment for Genesis Framework ***/
remove_action( 'genesis_comments', 'genesis_do_comments' );
add_action('genesis_comments', 'wpa_disqus_comments' );
function wpa_disqus_comments() {
if ( is_single() ) {
?>
<div class="comments"></div>
<?php }
}
After modifying my Disqus shortname in the javascript I get a blank comment section. I modified the <div class to random text to see if it appeared and it does so I suspect it’s something to do with the way I’m implementing the javascript. Any suggestions as to what I’m doing wrong?