Use Facebook Comments for Comment Count

Featured in: Adding Facebook Comments

/** * Facebook for Comment Count * * @author Bill Erickson * @link https://www.billerickson.net/facebook-comments-in-wordpress * * @param int $count * @param int $post_id * @return int $count */ function ea_facebook_for_comment_count( $count, $post_id ) { if( ! function_exists( 'ea_share' ) ) return $count; return ea_share()->core->count( $post_id, 'facebook_comments' ); } add_filter( 'get_comments_number', 'ea_facebook_for_comment_count', 10, 2 );

Bill Erickson

Bill Erickson is a freelance WordPress developer and a contributing developer to the Genesis framework. For the past 14 years he has worked with attorneys, publishers, corporations, and non-profits, building custom websites tailored to their needs and goals.

Ready to upgrade your website?

I build custom WordPress websites that look great and are easy to manage.

Let's Talk