Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Irfan-Ansari/9505211 to your computer and use it in GitHub Desktop.
Save Irfan-Ansari/9505211 to your computer and use it in GitHub Desktop.
jQuery( function( $ ) {
if ( 'undefined' === typeof FB )
return;
if ( $( 'body' ).hasClass( 'single-post' ) || $( 'body' ).hasClass( 'page' ) ) {
var $comments_div = $( '<div/>' );
$comments_div.addClass( 'fb-comments' );
$comments_div.attr( 'data-href', document.location );
$comments_div.appendTo( $( '.primary-content' ) );
FB.XFBML.parse();
}
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment