Title: [Plugin: Facebook] Comments outside the_content
Last modified: August 20, 2016

---

# [Plugin: Facebook] Comments outside the_content

 *  Resolved [Pancho Perez](https://wordpress.org/support/users/lonchbox/)
 * (@lonchbox)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-facebook-comments-outside-the_content/)
 * Hi,
 * Thanx for develop this plugin, but have something very annoying the comments 
   only show under the_content, inserted.
    It´s posible to take them out? In my 
   design I want the comments in the side fo the content not under and don´t like
   to move them with css, preferred something like `<?php facebook_comments() ?>`
 * 🙂
 * [http://wordpress.org/extend/plugins/facebook/](http://wordpress.org/extend/plugins/facebook/)

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Thread Starter [Pancho Perez](https://wordpress.org/support/users/lonchbox/)
 * (@lonchbox)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-facebook-comments-outside-the_content/#post-2871009)
 * I found a good solutions here: [](http://wordpress.org/support/topic/plugin-facebook-re-position-the-comments-box?replies=6)
 * Just copy to your functions.php this:
    `remove_action( 'init', 'fb_apply_filters')`
 * And can show the comments using this other in any part of the theme:
    `<?php 
   if (comments_open() && isset($fb_ver) && isset($options['comments']['enabled']))
   echo fb_comments_automatic(''); ?>`
 * In my personal case the full code not work so I only use this:
    `<?php echo fb_comments_automatic('');?
   >` And works
 * Good luck 🙂
 *  [buymylife](https://wordpress.org/support/users/buymylife/)
 * (@buymylife)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-facebook-comments-outside-the_content/#post-2871145)
 * AMAZING!!! Thank you thank you thank you
 *  Thread Starter [Pancho Perez](https://wordpress.org/support/users/lonchbox/)
 * (@lonchbox)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-facebook-comments-outside-the_content/#post-2871146)
 * [@buymylife](https://wordpress.org/support/users/buymylife/) Good this help you
   🙂
 * But now I´m having a problem related to this hack, removing the action of fb_apply_filters
   also affects the like button, and now I have to find a way to keep that hack 
   and show the like button 😛
 *  Thread Starter [Pancho Perez](https://wordpress.org/support/users/lonchbox/)
 * (@lonchbox)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-facebook-comments-outside-the_content/#post-2871148)
 * hey I find a way, just insert this in your single.php:
 * `<?php echo fb_like_button_automatic(''); ?>`
 * And then is possible to add like button in the position you want 🙂 but seams
   the options for the like button doesn´t work at all when it insert the like button
   with this call 🙁
 *  [sc456a](https://wordpress.org/support/users/sc456a/)
 * (@sc456a)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-facebook-comments-outside-the_content/#post-2871150)
 * Thanks for posting this, Pancho. It was exactly what I was looking for.
 *  [nickd32](https://wordpress.org/support/users/nickd32/)
 * (@nickd32)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-facebook-comments-outside-the_content/#post-2871168)
 * [@lonchbox](https://wordpress.org/support/users/lonchbox/) – I found a cleaner
   way that only affects the FB comments (and doesn’t disturb the other elements…
   like buttons, etc.)
 * First, from the [Codex…](http://codex.wordpress.org/Function_Reference/remove_filter)
 * > It is also worth noting that you may need to prioritise the removal of the 
   > filter to a hook that occurs after the filter is added. You cannot successfully
   > remove the filter before it has been added.
 * The trick is to add a new action hook that occurs after `init` — so I just chose`
   wp_head`, but there is [a list of other action hooks you could use](http://codex.wordpress.org/Plugin_API/Action_Reference).
 * Here is my code.
 *     ```
       add_action( 'wp_head', 'fix_fb_comment_placement' );
       function fix_fb_comment_placement() {
       	remove_filter('the_content', 'fb_comments_automatic', 30);
       }
       ```
   
 * Then, in your comments.php file (or wherever you want the comments to show up,
   include this line of code:
    `<?php echo fb_comments_automatic(''); ?>`
 *  Thread Starter [Pancho Perez](https://wordpress.org/support/users/lonchbox/)
 * (@lonchbox)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-facebook-comments-outside-the_content/#post-2871169)
 * hey [@nickd32](https://wordpress.org/support/users/nickd32/), I give a try, thanx
   🙂
 *  [nickd32](https://wordpress.org/support/users/nickd32/)
 * (@nickd32)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-facebook-comments-outside-the_content/#post-2871173)
 * Note that this solution doesn’t work in the new version (1.1.8) of the plugin,
   as the ‘fb_comments_automatic’ filter has been removed from the plugin.
 *  [nickd32](https://wordpress.org/support/users/nickd32/)
 * (@nickd32)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-facebook-comments-outside-the_content/#post-2871174)
 * OK, here’s my new fix. This gets a little more tricky, since now the comment 
   code is in a separate PHP class.
 * Place this in your functions.php file:
 *     ```
       add_action( 'wp_head', 'fix_fb_comment_placement' );
       function fix_fb_comment_placement() {
       	$priority = apply_filters( 'facebook_content_filter_priority', 30 );
       	remove_filter( 'the_content', array( 'Facebook_Comments', 'the_content_comments_box' ), $priority );
       }
       ```
   
 * Place this inside your comments.php file (or wherever you want the FB comments
   box to go…)
 *     ```
       <?php //Added for Official FB plugin
           $fb_comments = new Facebook_Comments();
           echo $fb_comments->the_content_comments_box();
       ?>
       ```
   
 * I decided to turn comments on/off based on whether regular WP comments were on
   for a particular post:
 *     ```
       <?php if ( comments_open() ) {
           //Added for Official FB plugin
           $fb_comments = new Facebook_Comments();
           echo $fb_comments->the_content_comments_box();
       } ?>
       ```
   
 *  [artabria](https://wordpress.org/support/users/artabria/)
 * (@artabria)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-facebook-comments-outside-the_content/#post-2871175)
 * Trying your code in my blog; this is WordPress’ response ->
 * Warning: **Missing argument 1** for Facebook_Comments::the_content_comments_box(),
   called in /wp-content/themes/Web-Site-Name-2012-01-18-235702/single.php on line
   79 and defined in /wp-content/plugins/facebook/social-plugins/class-facebook-
   comments.php on line 438
 *  Thread Starter [Pancho Perez](https://wordpress.org/support/users/lonchbox/)
 * (@lonchbox)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-facebook-comments-outside-the_content/#post-2871176)
 * @rickd32 thanx for the new code for the update fo the plugin 🙂 I give a try 
   soon.
 *  [tatof](https://wordpress.org/support/users/tatof/)
 * (@tatof)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-facebook-comments-outside-the_content/#post-2871183)
 * got the same error! what to do :(?
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-facebook-comments-outside-the_content/#post-2871184)
 * Create your own thread on the issue, Tatof. Otherwise it’s difficult for forum
   volunteers to track down who’s having which problem.

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘[Plugin: Facebook] Comments outside the_content’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/facebook_526fac.svg)
 * [Facebook](https://wordpress.org/plugins/facebook/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/facebook/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/facebook/)
 * [Active Topics](https://wordpress.org/support/plugin/facebook/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/facebook/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/facebook/reviews/)

## Tags

 * [Comments](https://wordpress.org/support/topic-tag/comments/)
 * [the_content](https://wordpress.org/support/topic-tag/the_content/)

 * 13 replies
 * 7 participants
 * Last reply from: [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * Last activity: [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-facebook-comments-outside-the_content/#post-2871184)
 * Status: resolved