I'm trying to replace the comments section with Facebook comments a la...
http://wp.tutsplus.com/tutorials/add-facebook-comments-to-your-wordpress-theme/
In my functions.php I appear to have all the components working with this code...
//Facebook Comments
function remove_comments(){
if (is_page()){
remove_action('thematic_comments_template','thematic_include_comments',5);
}
}
add_action('template_redirect','remove_comments');
function fbheader () { ?>
<meta property='fb:app_id' content='128410070627168' />
<?php
}
add_action('thematic_header', 'fbheader');
function fbcomments() { ?>
<div id="fbcomments"><div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<fb:comments href="<?php the_permalink(); ?>" width="640"></fb:comments></div>
<?php
}
add_action('thematic_abovecomments', 'fbcomments');
function fbcount () { ?>
<iframe src="http://www.facebook.com/plugins/comments.php?href=<?php the_permalink(); ?>&permalink=1" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:130px; height:16px;" allowTransparency="true"></iframe>
<?php
}
add_action('thematic_postfooter', 'fbcount');
Two concerns...
1.) To remove the normal comments section, in my CSS, I have
#comments {
display:none;
}
Should I be using some kind of remove_action filter?
2.) function fbcount replaces the whole postfooter and adds the Facebook-ey graphic there. I just want to either add the Facebook-ey comment count at the end of the postfooter in the same line after the tags or just make the normal comment count reference the Facebook comment count. Any suggestions?