WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Marcelo Pedra
    Member
    Posted 1 year 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!

    http://wordpress.org/extend/plugins/facebook/

  2. Niall Kennedy
    Member
    Plugin Author

    Posted 1 year ago #

    You can remove the filter on the_content after it is possibly added (if enabled for pages) at the wp action priority 10.
    http://plugins.trac.wordpress.org/browser/facebook/tags/1.4/facebook.php#L346

  3. Marcelo Pedra
    Member
    Posted 1 year 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
    Member
    Plugin Author

    Posted 1 year ago #

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

    http://codex.wordpress.org/Function_Reference/is_page

  5. Marcelo Pedra
    Member
    Posted 1 year 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

About this Topic

Tags

No tags yet.