WordPress.org

Ready to get started?Download WordPress

Forums

Simple Facebook Connect
shortcode for excluding like button (5 posts)

  1. perler
    Member
    Posted 2 years ago #

    hi,

    is there a short code to explicitly exclude the like button from one particular page?

    PAT

    http://wordpress.org/extend/plugins/simple-facebook-connect/

  2. Iamhere
    Member
    Posted 1 year ago #

    Here is the code to add to your page template

    <?php 
    
    // prevent facebook like buttons on this page
    remove_filter('the_content', 'sfc_like_button_automatic', 30);
    
    get_header(); 
    
    /*
    Template Name: Contact Us
    */?>
  3. perler
    Member
    Posted 1 year ago #

    we don't use a special template for the contact us page - so we need to put this code somewhere on this very page only - is there a way?

  4. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 1 year ago #

    if (is_page('contact')) {
    ... do stuff ...
    }
  5. perler
    Member
    Posted 1 year ago #

    mh.. I inserted this into page.php

    if (is_page('contact')) {
    remove_filter('the_content', 'sfc_like_button_automatic', 30);
    }
    
    get_header(); ?>

    but the fb like button is still there:

    http://blendermantheband.com/contact/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic