FACEBOOK LIKE BOX SHORTCODE PLUGIN FOR WORDPRESS
Recently we released our 2 Facebook Widgets
Facebook Contact Form and
Facebook Messenger Button for WordPress website today we are going to launch our third Facebook widget for WordPress
Facebook like box shortcode plugin Very Lightweight shortcode plugin.This is Our blog request post one of our blog reader asking this Fb like box shortcode widget.it will help us to save our time by adding simple shortcodes on our WordPress post’s, pages and sidebar for Displaying the Facebook Like Box.
- Build with Official Facebook Page Plugin tool
- We convert this Facebook plugin as shortcode
- it will help to reduce the plugin installation for adding Facebook like box to our WordPress posts and pages
- just use the single shortcode for display the Facebook like box on your WordPress website
INSTALLATION
1 | <div id= "fb-root" ></div> |
2 | <script>( function (d, s, id) { |
3 | var js, fjs = d.getElementsByTagName(s)[0]; |
4 | if (d.getElementById(id)) return ; |
5 | js = d.createElement(s); js.id = id; |
6 | js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.6" ; |
7 | fjs.parentNode.insertBefore(js, fjs); |
8 | }(document, 'script' , 'facebook-jssdk' ));</script> |
- Now add the Below PHP shortcode on your Theme’s funcation.php file
- Go to Appearance > Editor
function facebooklikebox($atts) {
extract( shortcode_atts( array(
), $atts ) );
return '<div class="fb-page" data-href="https://www.facebook.com/allwebtuts" data-small-header="true" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true"><div class="fb-xfbml-parse-ignore"></div></div>';
}
add_shortcode('myfacebook', 'facebooklikebox');
add_filter('widget_text', 'do_shortcode');
- replace https://www.facebook.com/allwebtuts with your Facebook Page URL
- That’s all Successfully we install FB Like box Shortcode Plugin on our WordPress website
HOW TO USE THIS?
usage of this plugin is very Simple Just use this Below shortcode on your post’s, page’s and sidebar
[myfacebook]
CUSTOMIZATION
function facebooklikebox($atts) {
extract( shortcode_atts( array(
), $atts ) );
return '<div class="fb-page" data-href="https://www.facebook.com/allwebtuts" data-small-header="true" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true"><div class="fb-xfbml-parse-ignore"></div></div>';
}
add_shortcode('myfacebook', 'facebooklikebox');
add_filter('widget_text', 'do_shortcode');
- Replace the red Color Highlighted Page Plugin code with your Facebook page Plugin Code
If you Have Any Doubts Please Feel Free to comment Here our team will Help you.
Comments
Post a Comment