[resolved] How can I avoid Like buttons to appear in specific pages (5 posts)

  1. Marcelo Pedra
    Posted 3 years ago #

    Hi! I'm using the like buttons in the pages of one site, but I need "something" to exclude specific pages from showing the buttons, like in contact forms, signup forms, login forms... Is there any filter, shortcode, plugin, something, to set the pages where I dont want Like buttons to be shown?
    Thank you!


  2. Niall Kennedy
    Plugin Author

    Posted 3 years ago #

    You can remove the filter on the_content after it is possibly added (if enabled for pages) at the wp action priority 10.

  3. Marcelo Pedra
    Posted 3 years ago #

    ok, let's see if I understand:

    remove_filter( 'the_content', 'facebook_the_content_like_button', 10 );

    How do I apply this to the specific pages I need the buttons not be shown?

  4. Niall Kennedy
    Plugin Author

    Posted 3 years ago #

    if ( is_page(42) ) {remove_filter()}


  5. Marcelo Pedra
    Posted 3 years ago #

    Hi. It worked well for this website... the only problems are
    1) In despite that I'll have to keep an eye on every plugin update to add the patch....
    2) The core problem is that it is within a multisite install, so the id for one contact form in this site, may be any other important page in other website..

    I thought on hiding the div via CSS, but the Elegant Theme in use is not setting the class id in the body tag, so I'm unable to distinguish individual pages via CSS :(

    Is there any shortcode or thing usable to do this without having to touch the original plugin files? If not, may this set a precedent to ask for a feature request? :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Facebook
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.