Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save davidvandenbor/27cff1d85296fd90da6c to your computer and use it in GitHub Desktop.
Save davidvandenbor/27cff1d85296fd90da6c to your computer and use it in GitHub Desktop.
WordPress: Facebook Like button shortcode
<?php
/**
* shortcode voor eigen Facebook like button
* shortcode for a simple Facebook like button
* @author @david
*/
function david_facebook_like() {
return '<div id="fb-root"></div>
<div class="fb-like" data-href="http://www.yoursite.com" data-layout="button_count" data-action="like" data-show-faces="true" data-share="true"></div>';
}
add_shortcode( 'facebook-like', 'david_facebook_like' );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment