Create a “Mashable-Inspired” Sidebar Social Widget for WordPress

Create a “Mashable-Inspired” Sidebar Social Widget for WordPress

Tutorial Details
  • Program: WordPress
  • Version (if applicable): 3.0+
  • Difficulty: Intermediate
  • Estimated Completion Time: 30-45 mins

Final Product What You'll Be Creating

I’ve had a lot of requests lately to share a tutorial on how I created the sidebar widget on my personal blog. It looks nice and most important, it works! With some simple PHP and CSS, I’m sure everybody can implement this on their blogs easily. Today I’m going to show you how to create mine… in hopes that you’ll be able to create your own custom version for your own projects!


Step 1 Get Social!

First, this requires that you have a Facebook Page, not just a regular profile… so if you don’t have one, you’ll need to make one first. We’ll proceed assuming that you already have one though!

Ok, let’s get your Facebook page and email subscription codes ready. Do not copy the codes in Step 1! Read everything here first. Copy only the completed code in Step 2… we’re just going to be going through the basics first:

What You’ll Need From Your Facebook Page

Let’s dive directly into some code that we’ll be using for the sidebar widget so I can point out a few piece of information that you’ll need. This snippet will be used for the Facebook Social portion of our widget:

	<div class="sidefb">
	<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
	<script type="text/javascript">FB.init("1690883eb733618b294e98cb1dfba95a");</script>
	<fb:fan profile_id="117354884961413" stream="0" connections="8" logobar="0" width="250" height="200" css="<?php bloginfo('stylesheet_url'); ?>?1" rel="stylesheet" type="text/css"></fb:fan> 
	</div>

Here’s the tricky part: Every time you edit your CSS, make sure to change the number ‘?1′ (on line 4 of the above example) to a different one that corresponds with the cache version of your CSS. If you don’t change it, it might not work. (this is admittedly a strange situation – I had successes and errors getting this to work).

<?php bloginfo('stylesheet_url'); ?>?1

For your Page ID (it’s a long number that represents your facebook page ID): Log in to your Facebook page > Edit page and you’ll see your own page id in the browser address bar. Use this for the profile ID on line 4 unless you want to advertise my Facebook page on your site ;).

sample

In your browser bar on the Edit Page, you’ll see something like this :

https://www.facebook.com/pages/edit/?id=107493166410111

You can also change the connections, width and height so that it fits nicely in your sidebar. Minimum width must be 250 (px), less than that and you won’t be able to fit the button and text inside the boxes.

Email Subscription Details

Now we need to grab your subscription details from Feedburner. Again, I’m assuming you already have this set up, so you should just need to log in and grab the following details.

Burn your feed using Feedburner and replace the Feedburner id in the code below with your own. The Feedburner id is the one on your feed burner URL. For example feeds.feedburner.com/ariff. Yeah, I had some confusion looking for that before this.

Here’s the actual code we’ll be using for the subscription portion of the widget:

<div class="sidesub">
<form action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=YOUR-ID-HERE', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true"><input type="submit" value="Subscribe" /><span><input type="text" style="width: 115px;
padding: 0px 0px 0px 0px;
vertical-align: middle;
font-size: 0.85em;
margin-top: -1px;
margin-left: 15px;" name="email" value="Email" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;"/><input type="hidden" value="ariff" name="uri"/><input type="hidden" name="loc" value="en_US"/>
</span></form></div>

Step 2 Putting It Together: The Full Code

You can turn this into a full blown plugin (or shortcode) if you’d like, but today we’re going to take a shortcut to get to the good stuff and work directly on a text-widget. No, this isn’t recommended for actual production… but it’ll get us moving right away.

Copy this code into a text widget on your sidebar. Remember to change all the attributes as mentioned above and include your own Twitter & Google+ credentials. If you already have Google+ button on your site, you can remove the Google+ javascript code from below as a single instance of the script is already enough for multiple buttons.


<div id="sidesocial">
<div class="sidefb">
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<script type="text/javascript">FB.init("1690883eb733618b294e98cb1dfba95a");</script>
<fb:fan profile_id="YOUR-PAGE-ID" stream="0" connections="8" logobar="0" width="250" height="200" css="<?php bloginfo('stylesheet_url'); ?>?1" rel="stylesheet" type="text/css"></fb:fan> 
</div>

<div class="sideg">
<div class="g-plusone" data-size="medium" data-href="http://YOUR-URL.com"></div><span>Recommend on Google</span>
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
</div>

<div class="sidetw">
<a href="https://twitter.com/YOUR-TWITTER" class="twitter-follow-button">Follow @YOU</a>
<script src="//platform.twitter.com/widgets.js" type="text/javascript"></script>
</div>

<div class="sidesub"><form action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=YOUR-ID-HERE', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true"><input type="submit" value="Subscribe" /><span><input type="text" style="width: 115px;
padding: 0px 0px 0px 0px;
vertical-align: middle;
font-size: 0.85em;
margin-top: -1px;
margin-left: 15px;" name="email" value="Email" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;"/><input type="hidden" value="ariff" name="uri"/><input type="hidden" name="loc" value="en_US"/></span></form>
</div>
</div>


Step 3 CSS Code

Copy the CSS codes into your theme stylesheet. Note that if the Facebook box does not work, the codes for the box must be put inside your main stylesheet (style.css) and not at some other place for custom codes.

/*-----Facebook fanpage styling start-----*/
.fan_box a:hover{
  text-decoration: none;
}
.fan_box .full_widget{
  height: 200px;  
  border: 0 !important;
  background: none !important;
  position: relative;
}/** Change height here **/
.fan_box .connect_top{
  background: none !important;
  padding: 0 !important;
}
.fan_box .profileimage, .fan_box .name_block{
  display: none;
}
.fan_box .connect_action{
  padding: 0 !important;
}
.fan_box .connections{
  padding: 0 !important;
  border: 0 !important;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;  
  font-weight: bold;
  color: #666;
}/** Change font-size here **/
span.total{
  color: #4a6cc1; 
  font-weight: bold;
}/** Change color here **/
.fan_box .connections .connections_grid {
  padding-top: 10px !important;
}
.fan_box .connections_grid .grid_item{
  padding: 0 10px 10px 0 !important;
}
.fan_box .connections_grid .grid_item .name{
  font-family: "lucida grande",tahoma,verdana,arial,sans-serif;
  font-weight: normal;
  color: #666 !important;
  padding-top: 1px !important;
}
.fan_box .connect_widget{
position: absolute;
bottom: 0;
left: 0px;
margin: 0 !important;
}
.fan_box .connect_widget .connect_widget_interactive_area {
margin: 0 !important;
}
.fan_box .connect_widget td.connect_widget_vertical_center {
padding: 0 !important;
}
/*-----Facebook fanpage styling end-----*/

#sidesocial{border: 1px solid #EBEBEB;}
.sideg{background-color: #EBF9E8;
font-size: .85em;color: black;padding: 9px 11px;line-height: 1px;border-top: 1px solid white;border-bottom: 1px solid #EBEBEB;}
.sidetw {background-color: #EEF9FD;padding: 9px 11px;line-height: 1px;border-top: 1px solid white;border-bottom: 1px solid #EBEBEB;}
.sidefb {font-size: .85em;color: black;padding: 9px 11px;line-height: 1px;border-top: 1px solid white;border-bottom: 1px solid #EBEBEB;}
.sideg span {margin-left: 2px;display: inline-block;vertical-align: text-top;color: #333}
.sidesub {padding: 9px 10px;line-height: 1px;background-color: #FFB86D;border-top: 1px solid white;}
.sidesub span {width: 115px;}

Conclusion

The end result should look like this:

Mashable Inspired Sidebar Social Widget

And we’re done! You can check the CSS code where I put some mark ups of what can be changed. All the best with this. Now you have something Mashable-ish on your site, with some customization as well.

Facebook page code source: Daddy Design

Keep in mind, this is just a starting point! Some of your advanced plugin devs out there might even have better ways of doing some of the stuff shown in this tutorial, so feel free to share your own comments and ideas in the comments section below! We’ll be sure to update the tutorial if anyone has any great insights.

Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • Pingback: My Stream » Create a “Mashable-Inspired” Sidebar Social Widget for WordPress

  • http://syahrilhafiz.com/blog syahrilhafiz

    congratz bro..nice tutorial :)

  • http://wpthemepower.com Zeeshan

    Simple and very nicely explained tutorial. It is important that websites today leverage their social media influence and such widgets help in taking the website brand value to the online places where people interact.

    • http://ariffshah.com ariff
      Author

      From my experience, showing people our social media influence via widgets like this more likely will encourage people to sign up and join the crowd. There’s a ‘herd mentality’ effect involved here.

  • AL

    Beats me doing the manual work. Thanks, will use it :)
    Seems like a net tut since this can be done with non-wordpress CMS and HTML/CSS

    • http://ariffshah.com ariff
      Author

      Right! Come to think of it, it is compatible for other CMS after some customization

  • http://www.izwannizamruslim.com izwannizam

    well done ariffshah.nice and easy tutorial to follow.your readers should start making their own now :)

  • http://azrijohan.com/ azrijohan

    best, but size facebook fan page box macam lain macam sikit… btw,congrats bro :D

  • http://kawangeek.com/ EddyGeek

    awesome, already have mashable like social widget on my blog, however I’m gonna give this a try as its look pretty cool. Thanks for the tutorial.

  • http://reezluvmedia@gmail.com reezluv

    wow..ariffshah featured in Tutplus..fuh..nice mate..

    • http://bloggerfolder.com Haru

      nice tuts bro :)

      im looking for one like this

  • Pingback: Mashable Inspired Sidebar Social Widget | | Logicamp's Blog

  • http://blog.geotitles.com Praveen Gowda I V

    Great one, keep it up

  • http://www.webmarketingpt.com Joao Rodrigues

    Hi Ariff,
    Awesome tut, congrats!
    I would make 2 suggestions to make the tut even better :)

    1- add YouTube with the number of subscribers
    2 – add the possibility of email subscription with name and email for a 3rd party email service, since a lot of bloggers use services like a weber, get response and so forth.

    Thanks again for this great tutorial!
    Will definitely add it to my favs!
    Joao

    • http://ariffshah.com ariff
      Author

      Joao,

      Thanks for the suggestions! I’m sure that would be a value added feature if this particular widget to be developed into a plugin.

      I even experimented with Google Friend Connect, but did not succeed. Lots more to learn.

  • http://lazaac.com lazaac

    nice tutorial bro… keep it up.. btw, xsangka u menulis utk wp.tuts+ jgak hohoho :)

  • Pingback: Entri Tutorial Pertama di Mata Dunia - blog.ariff

  • http://webdesignergeeks.com webdesignergeeks

    Really AW information.. Ariff also seen your blog amazing but not in english.

    And this is really nice article , love it

    Thanks For Sharing

    • http://ariffshah.com ariff
      Author

      Thanks! I love writing my blog in my local language (malay). It’s kind of like against all stereotypes but occasionally, I write in English too.

      Good site you have there. Cheers!

  • begs

    Instead of manually doing

    ?1

    Isn’t it possible do write something like:

    ?

  • begs

    lol. that ” pre thingy doesn’t work for me please kill the posts up there from me.
    Wouldn’t it be nice to have a “comment preview”?

    Last try (without php tags):

    Instead of manually doing
    bloginfo(‘stylesheet_url’);?1

    Isn’t it possible do write something like:
    bloginfo(‘stylesheet_url’);? echo md5(time());

    • Brandon Jones

      Couldn’t agree more Begs… I’ll pass this along to the design team :)

    • http://ariffshah.com ariff
      Author

      Hey begs!

      I used this before when the method I’ve shown here was not suitable for cached CDN files, but used a slightly different code instead, something like “file m time”

      Was not so sure about it, so I opted for the manual version. Thanks for the suggestion!

  • http://whysodumb.com Abhimanyu

    Look I know it sounds like spoon feeding but, yeah, guide me through the correct size of fb like box, or rather replace it with a like button (as in mashable). Also, the facebook styling does not succeed although I did put the code in style.css

    http://whysodumb.com/blog
    Right Sidebar – 1st widget.

    • http://ariffshah.com ariff
      Author

      Hey Abhimanyu,

      Try putting the direct link to your style.css instead of using the php tags.
      http://whysodumb.com/wp-content/themes/nuance/style.css?1

      Also inside your style.css, add

      .sidesub input {width:27%; padding:2px;}

      and look for this inside the div sidesub code and try changing the presets to

      font-size: 1.2em;
      margin-top: -3px;
      margin-left: 15px;

      Hope this helps

  • http://ariffshah.com ariff
    Author

    Hello all,

    What to do if the Facebook page did not turn out to be as shown here? Try changing the whole

    <?php bloginfo(‘stylesheet_url’); ?>?1

    into your stylesheet file URL. It should look something like this:

    css=”http://ariffshah.com/wp-content/themes/NomNom/style.css?120″

  • http://www.pacifista.my Pacifista

    nice bro.actually i’m tried another method but it’s make more difficult to understand.now i’m found your tutorial and it’s make more easier to understand.well done!:D

    • http://bit.ly/604Republic ariff
      Author

      Good to know. Glad it helped!

  • http://webdevelopergeeks.com webdevelopergeeks

    Great!! I was looking for such great tiny thing. It would be more preferred if it comes as as plugin. I hope someone will be planning for that. Even though for time being i will be happy using it. Thanks a lot!!

    • http://ariffshah.com ariff
      Author

      I was thinking about the same thing too. This could sell well if made into plugin and put into the marketplace. Still looking for devs since I’m not capable of developing a plugin like this on my own.

  • http://techdunes.com sudeep

    This is a very helpful post, i will implement the code in my blog.

  • http://eamdevelopers.com Joseph

    I loved going through the entire tut. I must admit I liked it. Thanks

  • Lesly

    Very nice tuto, I use it on website I just create but I have a very strange problem.. The like button is above facebook avatar.. http://www.hubrocket.fr/blog/

    • Lesly

      Okay, my bad, it’s just on my computer..

  • Pingback: Useful Tidbits November 16, 2011 — Shelley Keith

  • http://mobilethemesworld.net/ TheShadow

    Thanks for sharing this great tutorial.Works great on my website and i was looking for such type of code for a long time.

  • Pingback: Create Cool Social Widget (Facebook, Twitter, FeedBurner) In Wordpress

  • Pingback: wp-coder.net » Theme.fm Weekly Roundup 13

  • http://deluxejournal.com oto

    This is a very nice tutorial. Thats what am using currently on my blog now., Thanks for the information!

  • http://www.arkpizarro.com Ark

    Really Nice Work, Ariff!

    I was hoping you could tell me how to get the Facebook box to actually line up with the rest of the widget.

    You can see what I mean here: http://arkpizarro.com

    Thanks.

    • http://ariffshah.com ariff
      Author

      Hello Ark,

      Please change css=”?1″

      into css=”http://arkpizarro.com/wp-content/themes/thesis_182/style.css?1″

      I think that would work.

      Thanks!

      • http://ariffshah.com ariff
        Author

        woops. Forgot something.

        Please change css=”<?php bloginfo(‘stylesheet_url’); ?>?1″

        • http://www.arkpizarro.com Ark Pizarro

          Wow…

          At the risk of sounding dumb I must admit I couldn’t find what you referred to here’s what my css file looks like to give you an idea. Brace yourself it’s kind of crazy. Thanks.

          /*
          File: custom.css
          Description: Custom styles for Thesis. Marketers Delight styles by Kolakube.com

          BASIC USAGE:

          If you have enabled the custom stylesheet in the Thesis options panel, the tag
          will be appended with the “custom” class, like so: . You can use
          the “custom” class to override *any* CSS declarations contained in the style.css file.

          For example, if you wish to change the default link color to green, you would add the
          following declarations to this file:

          .custom a, .custom a:visited { color: #090; } <— This makes links green
          .custom a:hover { color: #00f; } <— This makes links blue when you mouse over them

          WHY THIS WORKS:

          By using the "custom" class, you are creating more specific CSS declarations for HTML
          elements. CSS styling is applied through rules of specificity, and because declarations
          prepended with .custom are more specific, they get applied when the page is rendered!

          More information about styling your Thesis installation using this file can be found
          in the User's Guide:
          http://diythemes.com/thesis/rtfm/customizing-thesis-with-customcss/
          */

          /*——————————————————————————————————–
          GLOBAL
          ——————————————————————————————————–*/

          .custom a { outline: none }

          .custom form input.name { background: #FFF url(images/name_icon.png) no-repeat left }
          .custom form input.email { background: #FFF url(images/mail_icon.png) no-repeat left }

          /*——————————————————————————————————–
          HEADER
          ——————————————————————————————————–*/

          #header_wrap { background: #F6F6F6 url(images/header_wrap.png) repeat-x bottom }

          .custom #header { position: relative }

          .custom #logo a { letter-spacing: -2px }

          #header_banner { float: right; margin-right: 1.1em }

          /*— NAV —*/

          .custom .menu { background: #2A2A2A url(images/menu.png) repeat-x bottom }
          .custom .menu a, .custom .menu a:hover { background: none; letter-spacing: normal }
          .custom .menu a:hover { text-decoration: underline }

          .custom .menu .current a, .custom .menu .current a:hover, .custom .menu .current-cat a, .custom .menu .current-cat a:hover { color: #878585; cursor: default }

          /*— OPTIN —*/

          .optin { overflow: hidden }
          .optin h3 { color: #FDFDFD; font-size: 3em; letter-spacing: -1px; line-height: 1.267em; margin-bottom: .267em }
          .desc p { font-size: 1.6em; line-height: 1.438em; margin-bottom: .5em }

          .optin form { float: right; overflow: hidden; padding: 2.2em 1.1em 1.8em 1.1em; width: 27.5em }
          .optin form p { font-size: 1.5em; margin-bottom: .533em }
          .optin input { background: #FFF; box-shadow: 0 0 10px #CCC inset; margin-bottom: 0.1em; padding: .8em 0.714em .667em 2.467em; width: 15.067em; -moz-box-shadow: 10px #CCC inset 0 0; -webkit-box-shadow: 10px #CCC inset 0 0; -moz-border-radius: 5px; -webkit-border-radius: 5px }
          .optin .submit { border: 0; color: #FDFDFD; display: block; font-size: 1.533em; height: 45px; padding: 0; width: 11.96em; -moz-border-radius: 0; -moz-box-shadow: none; -webkit-border-radius: none; -webkit-box-shadow: none }
          .optin .submit:hover { background-position: 0 -45px; cursor: pointer }

          .desc { padding: 2.2em 1.1em }

          .ribbon { color: #FDFDFD; float: right; height: 14em; margin-left: 1.5em; padding: 2.2em 1.5em; text-align: center; width: 9em }
          .ribbon h5 { font-size: 1.8em; letter-spacing: normal; line-height: 1.1em; margin-bottom: .3em }
          .ribbon p { font-size: 1.3em; line-height: 1.2em }

          /*– FEATURE BOX –*/

          #feature_box { background: #E6E6E6 url(images/feature_box.png) repeat-x top; overflow: hidden; padding: 2em 1.1%; text-shadow: 1px 1px 1px #FFF }
          #feature_box h4 { color: #444; font-size: 1.8em; font-weight: normal; margin-bottom: 0.1em; text-transform: uppercase }
          #feature_box p { color: #777; font-size: 1.5em; line-height: 1.471em }

          /*——————————————————————————————————–
          CONTENT
          ——————————————————————————————————–*/

          .custom #content_box { background: url(images/sidebar.png) repeat-y 61.4em 0 /* may need adjusting if you change overall site width. see instructions included in download */ }

          .custom #content { background: url(images/gray_shadow.png) repeat-x }

          /*– HEADLINES –*/

          .custom .headline_area h1, .custom .headline_area h2, .custom #archive_intro h1 { letter-spacing: -1.5px; line-height: 1.08em }

          .custom div.format_text h3 { font-size: 1.5em; letter-spacing: -1px; margin: 0 0 0.2em 0; text-transform: none }
          .custom div.format_text h4 { color: #333; font-size: 1.3em; font-weight: normal; letter-spacing: -1px; text-transform: none }
          .custom div.format_text h5 { color: #888; font-size: 1em; font-weight: normal }

          /*– POST STYLES –*/

          .custom .format_text blockquote { background: url(images/blockquote.png) no-repeat top left; border: 0 }

          .intro, .custom .format_text blockquote { color: #8D8D8D; font-size: 1.15em; line-height: 1.483em }

          .custom .format_text .note { background: #EBEBEB url(images/note.png) repeat-x bottom; color: #888 }
          .custom .format_text .alert { background: #FBF7D9 url(images/alert.png) repeat-x bottom; color: #918c67 }
          .custom .format_text .note, .custom .format_text .alert { border: 0; margin: 0 -1.533em 1.467em -.733em }

          .custom .format_text ul, .custom .format_text ol { margin: 0 0 1.571em 0.8em }
          .custom .format_text li { border-bottom: 1px dashed #CCC; list-style-position: inside; margin-bottom: 1em; padding-bottom: 1em }
          .custom .format_text ul li { list-style-image: url(images/bullet.png) }
          .custom .format_text li:last-child { border: 0; margin: 0; padding: 0 }

          /*– TEASERS –*/

          .custom a.more-link { background: #EEE; border-bottom: .2em solid #DDD; color: #666; padding: .1em .4em; text-decoration: none }
          .custom a.more-link:hover { background: #3C3B3B; color: #FFF }

          .custom .teasers_box { background: url(images/teasers_box.png) repeat-x; padding-bottom: 0 }
          .custom .teaser h2 { letter-spacing: -1px; line-height: normal }

          /*——————————————————————————————————-
          COMMENTS
          ——————————————————————————————————–*/

          .custom #comments { clear: both; margin: 0 }

          .custom #comments_intro p { background: #F1F1F1; border: 0.15em solid #DDD; border-width: 0 .15em .15em 0; color: #888; display: inline-block; font-size: 1.6em; margin-top: 1em; padding: 0.2em 0.4em; text-transform: uppercase; -moz-border-radius: 5px; -webkit-border-radius: 5px }
          .custom #comments_intro span { font-size: inherit }
          .custom #comments_intro span.bracket { display: none }

          .custom #comment_list { background: #333; border: 0; clear: both; margin: 0; padding: 1.1em }
          .custom #comment_list dt, .custom #respond { background: #FFF url(images/gray_shadow.png) repeat-x }
          .custom #comment_list dd { background: #FFF; border: 0; padding-bottom: 1.1em; margin-bottom: 1.1em }
          .custom #comment_list dd:last-child { margin-bottom: 0 }
          .custom #comment_list dl.children dt { background: #FFF }
          .custom #comment_list dl.children dd { padding: 0 }

          .custom .comment-reply-link { background: #EEE; padding: 0.4em; -moz-border-radius: 5px; -webkit-border-radius: 5px }

          .custom #respond { border-top: 1px solid #DDD }
          .custom #respond_intro { padding-top: 2em }

          .custom #commentform { border: 0 }

          .custom #archive_intro { border-bottom: 1px dashed #BBB }

          #singlenav, .custom .prev_next { background: url(images/gray_shadow.png) repeat-x; border-top: 1px solid #DDD; list-style: none; overflow: hidden; padding: 1.5em 1.1em }
          #singlenav #previous { float: left; text-align: left; width: 45% }
          #singlenav #next { float: right; text-align: right; width: 45% }
          #singlenav h5 { font-size: 1.3em; font-weight: normal; padding-bottom: 0.1em; text-transform: uppercase }
          #singlenav a { font-size: 1.1em; line-height: 1.4em; text-transform: uppercase }
          #singlenav a:hover { text-decoration: underline }

          /*——————————————————————————————————-
          SIDEBAR
          ——————————————————————————————————–*/

          .custom .sidebar li.widget { background: url(images/sidebar_divider.png) repeat-x bottom; margin-bottom: 1em; padding-bottom: 1em }
          .custom .sidebar li.widget:last-child { background: none; padding: 0 }
          .custom .sidebar h3 { font-variant: normal; letter-spacing: -0.5px; text-transform: none }

          /*– FEATURED –*/

          #feat ul { list-style: none }
          #feat li { background: url(images/products_divider.png) repeat-x top; margin-top: 1em; padding-top: 1em }

          #feat h3 { color: #FDFDFD; font-size: 2.3em; letter-spacing: -.5px; }

          #feat p { color: #C2C2C2; font-size: 1.5em; line-height: 1.333em }
          #feat p.title { color: #EEE; font-size: 1.7em; margin-bottom: .105em }
          #feat p.title a { color: #EEE }
          #feat p.title a:hover { color: #888 }

          #feat span { color: #222; font-size: 1.7em; text-shadow: 1px 1px 1px #787878 }

          #feat img { border: 0.3em solid #505050; float: right; margin-left: 0.5em }

          /*– OPTIN –*/

          #single_optin { background: url(images/sidebar_divider.png) repeat-x bottom; padding: 2.2em 1.1em }
          #single_optin h3 { color: #555; font-size: 2.2em; letter-spacing: -.5px }
          #single_optin p { color: #636363; font-size: 1.5em; line-height: 1.4em; text-shadow: 1px 1px 1px #FDFDFD }
          #single_optin form { margin-top: .4em }
          #single_optin input { border: 1px solid #C9C9C9; border-width: 1px 0 0 1px; font-size: .9em; margin-top: .8em; padding: 1em 1em 1em 3em; width: 82.5%; -moz-border-radius: 6px; -webkit-border-radius: 6px }
          #single_optin .submit { border: 0; color: #FDFDFD; cursor: pointer; font-size: 1.9em; margin-top: .4em; padding: 0.263em 0; width: 100% }
          #single_optin input.submit:hover { padding: .263em 0 }

          /*—–Facebook fanpage styling start—–*/
          .fan_box a:hover{
          text-decoration: none;
          }
          .fan_box .full_widget{
          height: 200px;
          border: 0 !important;
          background: none !important;
          position: relative;
          }/** Change height here **/
          .fan_box .connect_top{
          background: none !important;
          padding: 0 !important;
          }
          .fan_box .profileimage, .fan_box .name_block{
          display: none;
          }
          .fan_box .connect_action{
          padding: 0 !important;
          }
          .fan_box .connections{
          padding: 0 !important;
          border: 0 !important;
          font-family: Arial, Helvetica, sans-serif;
          font-size: 11px;
          font-weight: bold;
          color: #666;
          }/** Change font-size here **/
          span.total{
          color: #4a6cc1;
          font-weight: bold;
          }/** Change color here **/
          .fan_box .connections .connections_grid {
          padding-top: 10px !important;
          }
          .fan_box .connections_grid .grid_item{
          padding: 0 10px 10px 0 !important;
          }
          .fan_box .connections_grid .grid_item .name{
          font-family: "lucida grande",tahoma,verdana,arial,sans-serif;
          font-weight: normal;
          color: #666 !important;
          padding-top: 1px !important;
          }
          .fan_box .connect_widget{
          position: absolute;
          bottom: 0;
          left: 0px;
          margin: 0 !important;
          }
          .fan_box .connect_widget .connect_widget_interactive_area {
          margin: 0 !important;
          }
          .fan_box .connect_widget td.connect_widget_vertical_center {
          padding: 0 !important;
          }
          /*—–Facebook fanpage styling end—–*/

          #sidesocial{border: 1px solid #EBEBEB;}
          .sideg{background-color: #EBF9E8;
          font-size: .85em;color: black;padding: 9px 11px;line-height: 1px;border-top: 1px solid white;border-bottom: 1px solid #EBEBEB;}
          .sidetw {background-color: #EEF9FD;padding: 9px 11px;line-height: 1px;border-top: 1px solid white;border-bottom: 1px solid #EBEBEB;}
          .sidefb {font-size: .85em;color: black;padding: 9px 11px;line-height: 1px;border-top: 1px solid white;border-bottom: 1px solid #EBEBEB;}
          .sideg span {margin-left: 0px;display: inline-block;vertical-align: text-top;color: #333}
          .sidesub {padding: 9px 10px;line-height: 1px;background-color: #FFB86D;border-top: 1px solid white;}
          .sidesub span {width: 115px;}

          /*——————————————————————————————————-
          FOOTER
          ——————————————————————————————————–*/

          .custom #footer { background: #3D3D3D url(images/footer.png) repeat-x; padding: 2.2em 1.1%; text-align: left; text-shadow: 1px 1px 1px #222 }
          .custom #footer ul { overflow: hidden }
          .custom #footer li li { float: none; font-size: 1.5em; margin: 0 0 .4em 1.1em; list-style: square; width: auto }
          #footer h3 { color: #ffffff; font-size: 1.9em; margin-bottom: .1em; text-shadow: 1px 1px 1px #636363; text-transform: uppercase }
          #footer p { line-height: 1.3em }
          .custom #footer a { border: 0; color: #EEE }
          .custom #footer a:hover { color: #BBB }

          #copyright { background: url(images/copyright.png) repeat-x top; clear: both; margin-top: 2em; padding-top: 1.9em }

          /*——————————————————————————————————-
          SHARED
          ——————————————————————————————————–*/

          #feat, #single_optin .submit:hover { background: #616161; padding: 2.2em 1.1em; text-shadow: 1px 1px 1px #333; -moz-box-shadow: 0 0 20px #333 inset; -webkit-box-shadow: 0 0 30px #333 inset }

          #feature_box ul, #footer ul { list-style: none }
          #feature_box li, #footer li { float: left; margin-right: 2%; width: 32% }
          #feature_box .last, #footer .last { margin: 0 }

          .custom #logo a, .optin h3, .optin .submit, .ribbon h5, #feature_box h4, .custom .headline_area h1, .custom .headline_area h2, .custom .format_text h3, .custom .format_text h4, .custom .format_text h5, .custom #archive_intro h1, .custom .teaser h2, #single_optin .submit, #feat h3, #feat span, .custom .sidebar h3, #single_optin h3, #respond_intro p, .custom #comments_intro p, #footer h3 { font-family: "Arvo", Arial, serif }

          • http://ariffshah.com ariff
            Author

            Hey Ark,

            Here’s the code. What I meant to say was, the one in your sidebar widget http://snippi.com/s/qtf9ah4

  • http://www.superguide.com.au Robert Barnes

    Hi – This is brilliant. Thanks a lot. Just one thing though. I’ve added to my sidebar but that’s 300px width, so had to tweak it a bit. The trouble is there’s now a blue border in the Facebook portion which I wondered how I could get rid of?

    Many thanks in advance.

  • http://www.talkabouttech.com Udit Malhotra

    Please Help, My Facebook Thing Doesn’t Come, and Twitter Images Don’t Appear, Their Is Some Difference. Please Help Me. My Facebook and Twitter Sound Weired

    • http://www.talkabouttech.com Udit Malhotra

      Web Address : http://www.talkabouttech.com , widget is located on right bottom corner

      • http://ariffshah.com ariff
        Author

        I think everything looks good now. Sorry. Been busy with my studies for the past 2 weeks.

  • http://google.com zeta

    how beatuiful this !! is the author from indonesian ??

    • http://ariffshah.com ariff
      Author

      Close. I’m from Malaysia =)

  • http://collegeinterviewquestions.net harold

    Nice share ariff,it really helpfull although it seem pretty hard,anyway i will try to follow your tutorial

  • http://archive-id.blogspot.com pointbreak

    Are u Indonesian ariff ? I’m sorry if i was commented with speaking badly,but i just want ask how i can put this on blogger ? i’ll try but always wrong ~

    • http://ariffshah.com ariff
      Author

      Nope. I’m Malaysian. The steps are different if you’re trying to implement this on Blogger because this involve a style.css file that does not exist in Blogger. I’m working on a tutorial on this for Blogger and hopefully to publish it soon.

  • http://xtendedview.com rudhal

    like.. extreme stuff..

    tell me if i want to put on site with constant location like it should be on constant location even if i scroll down just as you put a same on your left site . please help me.

    • http://ariffshah.com ariff
      Author

      That is possible but you have to look for the code the get the scrolling thing. Never used one as it is kind of distracting.

  • http://www.techomag.com antodoms

    Thanks for the tutorial… Wanted to put similar design to my sidebar….. thanks… :)

  • http://www.techcular.com Soumya Pratihari

    Excellent widget. Looks cool, pretty useful.

    However, just got one problem. Followed the tutorial and comments from top to bottom, did everything I could do, but the “Like” button is still appearing on the top of the Facebook page. It’s covering the “xxxx people like YYYY” text.

    Ariff, please check http://www.techcular.com and guide. Thanks a lot in advance :)

    • http://www.techcular.com Soumya Pratihari

      Anyone listening?

      • http://ariffshah.com ariff
        Author

        Sorry. Been away for quite a while. I see that you have changed the styling altogether thus I can’t exactly help you with the original problem.

  • http://embdesigntube.blogspot.com/ Max

    Thanks.I have applied your trick to my blog and it works.I did some changes to the widget and made it exactly like mashable.

  • Pingback: Создание социального виджета «как в Mashable» для боковой панели | Wordpresso

  • http://diabetichumility.com Toni Miller

    Thanks for sharing. Love your site, and how helpful it is to the ‘WordPress illiterate’. I tried to use this, but it did not look like the end product that you showed in the picture, so I just kept the face book portion. It worked just fine. Thanks again for sharing. Also, are there any tutorials on using themes with only one sidebar built in? It seems to be a problem when trying to restore all of your prior widgets into a theme with only one sidebar. Thanks again,

    Toni Miller

  • http://www.welitso.de Florian

    The Twitter Images Don’t Appear .. :(

    • Florian

      Ok the twitter image is ok now. But when i try to Subscribe to my Feed via Feedburner, then Feedburner would subscribe ti your Blog!

  • http://www.mrpinindia.in Pranjal

    That appears good but I’m interested in WP Tuts style widget- that’s right on the sidebar, anyone?

  • http://www.techmywish.com Avinash

    thanks you so much and nice tutorial :)

  • http://greenmonster.in Johny

    very simple and also this don’t affect site speed too much..

  • Pingback: Pasang Mashable Social Box Pada Sidebar Blog | MrPiratz[dot]Com

  • http://androidhogger.com Kunal

    Would love to put this beautiful widget on my beautiful blog.

  • http://sql.oracletuts.net/ TJ Abrahamsen

    I implemented this code on my sites when the tutorial was posted. It has worked great! Thank you for sharing this.

    My sites are pretty new, and I did not advertise them enough earlier….so I have not noticed this before…due to lack of Facebook likes….

    This might be a Facebook setup issue, but I am not sure. I see the text “1 person likes…”, but no faces in the like box. When I log in to Facebook I DO see the faces. I do not have any restrictions on my page.

    Anyone knows why…?

    I am new commenting on this blog, but have been watching and reading a lot. Thank you all for your posts and comments contributing to a nice community.

    ~ TJ

  • http://techhogger.com Kunal @ TechHogger

    Hey I got a problem. On my blog techhogger.com it appears fine on home page. But if a post if opened the facebook like box does not appear. But the same is not happening on my another blog androidhogger.com. It is working fine with the same piece of code.

  • Anna

    Hello Ariff! I’m Anna. I love Malaysia. What part are you from? Anyway, beautiful plugin!! Great job! I would definitely add it to my company’s blog sidebar if it had a simple pinterest section similar to the twitter section you created. My boss wants all media outlets complete in one plugin, but this is BEAUTIFUL! I’ll bookmark it for future reference! Thank you! :)

  • Pingback: Weekly Roundup for Jan 16th to 22nd 2012 - WPKewl!

  • http://www.geekandblogger.com Pavan Somu

    Thanks for the awesome piece of code. This really rocks :)

  • deepak

    thanks for the code part from this ..i think now plugin has been released for this …

  • http://officiallythehottest.com/ Akash Sharma

    Hi,

    I’ve set everything correct so far, however I have a slight problem with the “like” button for Facebook. It’s messing up the style. How can I fix that?

    Here is my site: http://officiallythehottest.com/

    Thanks,
    Akash Sharma

  • faisal

    Thank you!

  • Monty

    Thanks for this tutorial!

    I prefer adding codes rather than using plugins. I have added it to my website with little extra styling. Nice share though! thanks.

  • http://angadgets.net/ sam

    awesome work !! I prefer adding codes rather than using plugins.

  • http://themebox.in/ James

    Thanks.I have applied your trick to my blog and it works.I did some changes to the widget and made it exactly like mashable.

  • http://themebox.in/ James

    Great!! I was looking for such great tiny thing. It would be more preferred if it comes as as plugin. I hope someone will be planning for that. Even though for time being i will be happy using it. Thanks a lot!!

  • http://movieswtf.com Vikas Sindher

    Hello Sir,

    I tried to implement this code on my blog but there was problem with padding and spacing. Do i have to edit it with respect to my theme?

  • Ben Nafi

    Great fren… :)
    thats what i searched for long time..

  • Surinder Rajpal

    How to do this for blogger. As my blog is http://programmingworld4u.blogspot.com/

  • KHimarabhai Rajesh

    I have also tried mashable like widget in my blog http://www.howtoguide.in but it doesn’t appearing in the blog. What to do?

  • http://techbymak.com/ Akshay Makadiya

    Thank you Sir. I have Added this beautiful widget inside my post but it is not appearing How to solve this ?
    http://www.whatismyresults.com/2013/04/cbse-10th-class-results-www-cbse-nic-in.html