WordPress.org

Forums

Facebook Comments
[resolved] Disable on Specific Posts (9 posts)

  1. Frank Gomez
    Member
    Posted 2 years ago #

    I want to disable Facebook Comments on specific posts. Can I use a custom function in a child theme to accomplish this?

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

  2. Alex Moss
    Member
    Plugin Contributor

    Posted 2 years ago #

    It's best at the moment to embed the shortcode into your theme and then disable the output on each specific page/posts. More information can be found within the plugin homepage.

  3. Tony Franco
    Member
    Posted 2 years ago #

    Hi Alex,

    Thanks by your reply.

    I tried what is in the homepage, but i can´t make it work...

    If it has a shortcode to disable on certain posts, it would be easy to me, like [/fbcomments], because i don´t know how to use the code directly to php...

    Regards,

    Tony

  4. Alex Moss
    Member
    Plugin Contributor

    Posted 2 years ago #

    no, you'd have to insert PHP code. For example, if I don't want to include the comments on post ID 678:

    if (!is_page('678')) {
    echo do_shortcode('[fbcomments]');
    }
  5. Tony Franco
    Member
    Posted 2 years ago #

    Hi Alex,

    Sorry for my question, i´m new...

    Where do i put this code?

    Regards,

    Tony

  6. Alex Moss
    Member
    Plugin Contributor

    Posted 2 years ago #

    You can insert this within single.php

  7. Frank Gomez
    Member
    Posted 2 years ago #

    I had to go another route because my client has about 300 posts. I'm not going to itemize these. I ended up creating separate post templates and then disabled them by template with CSS - not an elegant solution but it works.

  8. Rhoody
    Member
    Posted 2 years ago #

    I cam from http://wordpress.org/support/topic/disable-fb-comments-on-lingle-posts?replies=2#post-5352303
    I also will have around 500 pots (FAQs)I am nit gonna change the single.php for each new FAQ. Guess need to look for another plugin then. At the end if you have the opt-in shortcut there should be also a opt-out somehow.

  9. Alex Moss
    Member
    Plugin Contributor

    Posted 2 years ago #

    Let me have a look into how this can be done best for you...

Topic Closed

This topic has been closed to new replies.

About this Plugin

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

About this Topic