Last active
December 13, 2015 17:28
-
-
Save spencermorin/4948165 to your computer and use it in GitHub Desktop.
Remove default Facebook Comments placement on WordPress.com VIP.
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 | |
// 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