Facebook Comments
[closed] Hide Comments box in some pages/posts using ID (7 posts)

  1. gonix
    Posted 3 years ago #

    Is it possible to hide the comments box in some pages indicated by each page/post ID?

    I searched and I come up with this:

    add in header.php:

    <body <?php body_class(); ?>>

    and this in css:

    .page-id-1462 .fb_iframe_widget {

    but it doesnt work so I try:

    .page-id-1545 .fbFeedbackContent {

    but still didn't work.

    Can anyone point me in the right direction?

    - Gon


  2. littlethoughts
    Posted 3 years ago #

    This isn't a very convenient way to deal with elements you don't want to appear. For pages you can use this php code in the php file(s) where you want the comments to disappear:

    if (!is_single(array(123,345,456))) {echo do_shortcode('[fbcomments]');}

    Replace the IDs 123,345,456 with the ones that you want to hide.

    For posts use:

    if (is_single(array(123,345,456))) {echo do_shortcode('[fbcomments]');}

    Hope that helps!

  3. gonix
    Posted 3 years ago #

    I have tried that as well but it doesnt work. Maybe there is something wrong with my theme. I fixed the issue by using another plugin instead. Thank you for your suggestion.

  4. lucasrubini
    Posted 3 years ago #

    Hey gonix, what plugin did you use to fix that? I have the same problem!

  5. gonix
    Posted 3 years ago #

    lucasrubini.. i forgot :( i think i disabled the comment box in this plugin and use another facebook plugin which can hide comments in pages.

  6. Tony Franco
    Posted 2 years ago #

    Dear Sirs,

    Nice post... i have the same doubt...

    Please, i want to remove the fb comments of a single post, this for example:


    What code i have to put to remove at this post?

    Thanks and Regards,


  7. esmi
    Forum Moderator
    Posted 2 years ago #

    @Tony Franco: If you require assistance then, as per the Forum Welcome, please post your own topic.

    This 11 month old topic references an old version of WordPress.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Facebook Comments
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic