Himanshu

Negi

Developer & Internet Marketer


Welcome to my blog.

Sed sed leo sit amet elit sagittis fermentum. Nulla posuere commodo erat. Nam ac nunc ipsum, id espara tincidunt orci. Quisque adipiscing molestie dolor, ut congue sem porta et. Sed sapien urna, auctor et accumsan ut, accumsan sit amet dui. Nunc tristique interdum magna, dictum volutpat sem. Nam ac nunc ipsum, id espara tincidunt orci. Sed sapien urna, auctor et accumsan ut.

Social Plugin for WordPress- Facebook, Google+, Twitter and Feedburner

May 9, 2017wp-himu0 Comments

Today, social networking websites provide all kinds of tool and widgets (including API) so that webmasters can show their social presence at their blogs. Some of them provide buttons while some them provides highly customizable widgets. These widgets and buttons come in different shapes and sizes that may not suit all of us and our specific needs. So, here I am going to share a nice wordpress plugin that will facilitate you to add Facebook Like button, Google+ link, twitter button and links to other social sites right from you wordpress sidebar. I made a few chances to code so that it may look even better (by adding FB like box to it) and code is shared.

social plugin

The default plugin looks fine but I hacked (modified only a few lines of code :D) because I didn’t like Facebook like button instead I prefer to display Facebook Like Box.

Social Plugin: Download WP-MashSocial or Simple Search for it!

 

How to Hack this Social Plugin?

OK Let’s start customizing this social plugin to suit our needs. First of all, install this social plugin then go to list of installed plugins (wordpress dashboard > plugins > installed plugins), look for wp-mashsocial plugin and then click on edit to get into its php code. You have to find following code:

 

[codesyntax lang=”php” title=”social plugin code” bookmarkname=”social plugin code”]

<?php if ($fb_id) { ?>
<div style="background: <?php echo $fbboxcolor_id; ?>;">

:

Some code that we’ll remove

:

</div>
<?php }?>

[/codesyntax]

 

Then go to facebook developer page and get the iframe code for your facebook like box. Then remove all the code between this function and add your iframe code there. Finally the code should look like as follows:

[codesyntax lang=”php” title=”social plugin code” bookmarkname=”social plugin code”]

<?php if ($fb_id) { ?>
<div style=”background: <?php echo $fbboxcolor_id; ?>;”>

<iframe src=”//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2Fhimanshunegi.xyz&amp;width=300&amp;height=258&amp;show_faces=true&amp;colorscheme=light&amp;stream=false&amp;show_border=false&amp;header=false&amp;appId=169174726489597″ scrolling=”no” frameborder=”0″ style=”border:none; overflow:hidden; width:300px; height:258px;” allowTransparency=”true”></iframe>

</div>
<?php }?>

[/codesyntax]

After changing this code make sure you should go to wp-mashsocial setting page and put some text (or anything) in facebook id setting box otherwise the code you have added will not get activated and will therefore not work.

Hope your new social plugin is working fine and looking awesome! If you have any query or feedback you can leave a comment below. If you like the new plugin then please consider linking to this page from your new social plugin.


Leave a Reply
www.edatastyle.com www.introducingsomething.com