How to add Google+ Comments to WordPress?

How to add Google+ Comments to WordPress?

Google+ has just introduced Google+ Comments for Blogger and people are desperate to see them on their non-Blogger blogs and websites. Well, I researched a bit and found a solution how one can incorporate Google+ comments on WordPress with just a minor editing of theme files.

Adding Google+ Comments to WordPress

Add the below given code into the comments.php file of your WordPress theme. If you’re afraid with the editing, consider putting this code either at the bottom of all the code in comments.php and then save the changes.

<script type="text/javascript" src=""></script>
<div id="plusonecomments"></div>
<script type="text/javascript">
  window.setTimeout(function() {
    var id = 'plusonecomments';
    var divWidth = document.getElementById(id).offsetWidth;
    var width = !!divWidth ? Math.min(divWidth, 750) : 600;
    var url = "<?php the_permalink(); ?>";
    var moderationUrl = "";
    var moderationMode = "FILTERED_POSTMOD";
    gapi.comments.render(id, {
        'href': url,
        'first_party_property': 'BLOGGER',
        'legacy_comment_moderation_url': moderationUrl,
        'view_type': moderationMode,
        'width': width
  }, 10);

Done! Now see Google+ comments in action on your WordPress blog! Hope you’ve a good read.