Skip to content

Instantly share code, notes, and snippets.

@spencermorin
Last active December 13, 2015 17:28
Show Gist options
  • Save spencermorin/4948165 to your computer and use it in GitHub Desktop.
Save spencermorin/4948165 to your computer and use it in GitHub Desktop.
Remove default Facebook Comments placement on WordPress.com VIP.
<?php
// In theme's functions.php.
function pl_remove_facebook_comments() {
remove_filter( 'the_content', 'fb_comments_automatic', 30 );
remove_filter( 'comments_array', 'fb_close_wp_comments' );
remove_filter( 'the_posts', 'fb_set_wp_comment_status' );
remove_action( 'wp_enqueue_scripts', 'fb_hide_wp_comments' );
remove_filter( 'comments_number', 'fb_get_comments_count' );
}
add_action( 'init', 'pl_remove_facebook_comments' );
// Manually add facebook comments above wp comments in comments.php.
if( function_exists( 'fb_comments_automatic' ) )
echo fb_comments_automatic( '' );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment