Created
March 11, 2013 18:12
-
-
Save jimmynotjim/5136312 to your computer and use it in GitHub Desktop.
Facebook Comments w/ Wordpress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* 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; | |
?> | |
<?php if ( comments_open() ) : ?> | |
<div id="fb-root"></div> | |
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script> | |
<section class="comments"> | |
<h2>Leave a comment</h2> | |
<div class="fb-comments" data-href="<?php echo get_permalink(); ?>" data-num-posts="4" data-width="570px"></div> | |
</section> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment