• 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 {
      display:none;
    }

    but it doesnt work so I try:

    .page-id-1545 .fbFeedbackContent {
      display:none;
    }

    but still didn’t work.

    Can anyone point me in the right direction?

    Thanks!
    – Gon

    http://wordpress.org/extend/plugins/facebook-comments-plugin/

Viewing 6 replies - 1 through 6 (of 6 total)
  • 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!

    Thread Starter gonix

    (@gonix)

    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.

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

    Thread Starter gonix

    (@gonix)

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

    Dear Sirs,

    Nice post… i have the same doubt…

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

    http://www.obrasdarte.com/venda/

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

    Thanks and Regards,

    Tony

    @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.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Hide Comments box in some pages/posts using ID’ is closed to new replies.