WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Simple Likebuttons (Facebook, Google , Twitter)] Disable pages or posts

[Plugin: Simple Likebuttons (Facebook, Google , Twitter)] Disable pages or posts

  • Hi,

    you already wrote, that you can disabale the likebuttons on pages or posts? How can I do that? Can you please give me an example?

    Many Thanx!

    This is your code:

    //Only show at a single post / page the extended (if configurated) view
      if(is_single() or is_page()) {
        return $strContent . getLikeButtonsHtmlCode();
      } else {
        return $strContent . getLikeButtonsHtmlCode('small');
      }
    }

    [Moderator Note: Please post code or markup snippets between backticks or use the code button.]

    http://wordpress.org/extend/plugins/simple-likebuttons/

Viewing 1 replies (of 1 total)
  • I think I got it, with this code I can disable the buttons on post ids 3600, post id 7580 and on all pages:

    //Add icons method
    function add_simple_likebuttons($strContent) {
    
      //Only show at a single post / page the extended (if configurated) view
    
    if(is_single('3600') or is_single('7580') or is_page()){
        return $strContent;
      } else {
        return $strContent . getLikeButtonsHtmlCode();
      }
    
    }

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Simple Likebuttons (Facebook, Google , Twitter)] Disable pages or posts’ is closed to new replies.