How To Add Cool Floating Social Icons in Thesis WordPress Blog

by Jane Sheeba| Join Jane on Google+

Social networking is the backbone of every blog. There cannot be a successful blog without the back up of social media and all those people who tweet, stumble, facebook share, etc. your blog posts.

Putting social media icons on a blog makes it convenient for the readers to bookmark, share and save the article. For instance there are social sharing buttons at the bottom and (right) side of the posts in this blog. This is to make it easier for the readers to share and/or bookmark a blog post if they find it useful and interesting.

On the other hand, in this post, I am talking about sticky social icons that make it easier for people to follow or friend you on a social profile. I repeat- these are not sharing buttons that I am talking about in this post.

Well here is a screen shot of what you’d get if you follow the instructions in this post.

cool floating social profile icons on the side of thesis wordpress blog

So these are icons that stick to the side (left or right, as you choose) of your thesis wordpress blog. They are called floating or sticky icons because they are just there even if you scroll down and all the content goes up and down.

In this illustration I have used 4 icons on the left of my site. The icons are Twitter, Facebook, Google Buzz, which lead to my profile page in the respective social media and the fourth icon is my site feed.

You can actually use as many icons as you wish, but since this is a floating icon on the side it is better to keep the number less so that your thesis blog doesn’t look cluttered.

Do more code less Thesis theme for your blog

Step 1:

Before starting to work on your floating icons, you have to find the icons that match your theme and to your taste. You can google for “social media icons” or “social media buttons” to find excellent and cool packs of icons. Choose a set from that. And, it will be better if the icons are neither too big nor too small. In this blog I have used 50X50 icons.

Step 2:

Go to WordPress Dashboard and on the left click “Add New” under “Media” tab and upload the icons you are going to add in the sidebar one by one. Add necessary alt tags and don’t forget to copy the url of the image file and then click save. Put the urls in a text file. You will need them later.

Step 3:

Paste the following code in custom_functions.php

/* FLOATING SOCIAL icons ON SIDE OF SITE */

function floating_icons() { ?>
<div id="bookmarks"><a id="twitter" title="Follow @janesheeba on Twitter" href="http://twitter.com/twitterusername" rel="nofollow" target="_blank">Follow @janesheeba on Twitter</a>
Become a friend of Jane on facebook
Contact Us
<a id="rss" title="Subscribe to Find All Answers via RSS" href="feedurl" rel="nofollow" target="_blank">Subscribe to Find All Answers via RSS</a></div>
&nbsp;

add_action('thesis_hook_before_header', 'floating_icons');

Click the Big Ass Save Button.

As you can see, I have defined the function “floating_icons” and have specified the job of the function. It basically creates clickable image icons. All the icons are packed inside a <div> which is of class “bookmarks”. The styling for this class will be done in the next step in custom.css.

And, all the individual clicakble icons are assigned separate classes, namely twitter, facebook etc. whose styling also will be dealt in the next step.

Now make sure that you replace the “title” and the anchor text to something else of your choice (that is, don’t use my name ;) ). Inside the quotes of href=”" you have to specify the url of your profile page of that particular social media.

The rel=”nofollow” makes the hyperlinks of the icons no follow, thus not wasting your link juice and target=”_blank” makes the target page to be opened in a new tab, thus not making your visitors to leave your site.

Step 4:

This step is for styling all the classes mentioned in custom.css of your Thesis theme.

Paste the following code in custom.css

/* Styling your Floating Social Icons */
.custom #bookmarks {background: transparent; width: 50px; position: fixed; top: 45%; left: 0.55%;}
.custom #bookmarks a {display: block; text-indent: -9999px; height: 50px;}
.custom #bookmarks #twitter {background: url('twittericonurl')}
.custom #bookmarks #facebook {background: url('facebookiconurl')}
.custom #bookmarks #buzz {background: url('googlebuzziconurl')}
.custom #bookmarks #rss {background: url('rssiconurl')}

Click the Big Ass Save Button.

The first two lines style the main bookmark class. Since my icons are 50X50 I have set width and height to be 50. Top 45% specifies the position of the icons from the top. In this blog I have used 45%. It depends on the height of your header and also where you want your icons to be. If you change “left” to “right” you can have the icons on the right side of your blog.

The last 4 lines are for styling the individual buttons inside the main “bookmark” class. All you have to do is to insert the url of the corresponding image files which you saved in a text file in Step 2.

All done. Now if you visit your blog, you should see the floating icons on the side.

Let me know if you have any difficulties in doing this.

What? You haven’t got Thesis Theme yet? Click here to get this rocking theme and rock the blogosphere! Find All Answers runs on this awesome theme.

Do more code less with thesis theme for wordpress

Like this post? Share it!
Get Free Updates & Ebooks

{ 37 comments… read them below or add one }

Deepanshu

its resulting in an error when i try to paste in functions.php :-( Parse error: syntax error, unexpected ‘?’ in line …
i m not using thesis..maybe thats the reason :roll: sry for the noob question but i m new to wp :?
Deepanshu recently posted..WBJEE 2011 Postponed from April 17 to May 22My Profile

Reply

Jane Sheeba

Hi Deepan,

Don’t worry about being new.

Try replacing the first line of the html with this

function floating_icons() { ?>

let me know if you still have any issues.

Cheers,
Jane.
Jane Sheeba recently posted..Why Is A Blog Not Updated RegularlyMy Profile

Reply

Deepanshu

still error :?
Parse error: syntax error, unexpected T_ENDWHILE in ……
sorry to bother u :?

Reply

Jane Sheeba

I have updated the code. I have also sent you an email. Let me know if it works.

Jane.
Jane Sheeba recently posted..4000 In Cash Prizes Will Ya Support Me As Crazy As You CanMy Profile

Reply

Deepanshu

thanks for ur response and willingness to help..i really appreciate it :-) i have sent u a mail back :-)
Deepanshu recently posted..AIEEE 2011 – Yes u can surely CRACK itMy Profile

Reply

lisa

I followed your instructions for adding the social media icons to my Thesis themed site, except where do I add the media graphics url in the code, so the photo I uploaded to my admin Media file in Wordpress shows up with the text.

Please take a look at my site: http://www.fromgeorgiatogermany.com

Thanks!

Lisa

Reply

Jane Sheeba

Hey Lisa,

Perfect. You have done the coding correctly, the media button appears at the right position and it points to a link. I have 4 suggestions:

1. As you have said, you have to add the url to your social profile.
2. The size of the icon is big. You may use 50×50 or lesser. I use 50×50 at this blog.
3. Use the media buttons that you most actively use. And using RSS is also a good option to catch subscribers easily in a less noisy manner.
4. 4 buttons or less should be fine; not more.

Cheers,
Jane.
Jane Sheeba recently posted..How I Managed To Get My Posts Featured On A-List BlogsMy Profile

Reply

Deepanshu

hey jane
can u plz write a post for similar in non thesis themes…u wrote a mail some days back but i have been waiting since then :-)
Deepanshu recently posted..SASTRA University Admission Notice 2011My Profile

Reply

DoFollowBlogger

howdy

Jane, are you offering a psd to wordpress coding service?

I got a psd and i need a good coder for sclicing it for crafting it to a wp themen.

cheers
-
DoFollowBlogger recently posted..Oh Du Panda- mein warmer BruderMy Profile

Reply

Jane Sheeba

Hmm.. I am not doing that kinda stuff :( I am sure you can find one though.

Reply

Ragunath

Sister can you list out the E-Books for thesis Tutorial. still now i did nt experiment with thesis, what are all the things that we need to know to set up thesis theme well, meanwhile can you tell me what kind of knowledge do we need to improve as a blogger to design Pakha Website.

Reply

NickK

Hi Jane,

That’s a great little tutorial for the social icons - works a treat!

One thing - how would I go about increasing the padding between the icons? My css skills are very limited!

http://www.theoffcutfestival.com/blog/

Nick

Reply

Jane Sheeba

Hi Nick,

That’s OK about your CSS. You simply have to add padding-top: 15 px (just an example, you might want to play with the number) into

.custom #bookmarks {

Hope you will make it :)

Cheers,
Jane.
Jane Sheeba recently posted..You Must Get Social For Your Blogging SuccessMy Profile

Reply

Tricia

Hi Jane,

I love your tutorial and found that it worked great! I had my icons exactly where they were supposed to be for several days. Then I was working on the site and the icons are now gone. I have removed everything I’ve done over the past day hoping that I’d find something that was causing the issue. I’ve checked and re-checked both my custom_functions.php file and my custom.css file. You’ll have to forgive me because I’m a relative newbie when it comes both to Thesis and to coding CSS or PHP. Is there anyway I could send you my two files and have you take a look?

I really appreciate your time and assistance! My site is http://drinkmangosteen.net/

Thanks,
Tricia

Reply

Jane Sheeba

I just checked out your site and the floating icons are in place and good. Seems that your problem is solved?!

Jane.
Jane Sheeba recently posted..7 Reasons I will Un-Friend You On FacebookMy Profile

Reply

Tricia

Jane,

Thank you for your reply and for checking the site. It’s really strange because I cannot see the icons in Firefox or IE but I can see them in Chrome. I tried from multiple PC’s. Any ideas on what would cause them to only show in Chrome?

Thanks again!

Tricia

Reply

Tricia

Jane,

Hi again. I continue to have the issue with the icons not displaying in either IE or Firefox though they show perfectly in Chrome. I went so far as to completely remove Wordpress, reinstall it and recreate my site with Thesis to no avail. Do you have any thoughts on what I can check?

Thank you again for your time.

-Tricia
Tricia recently posted..Hello world!My Profile

Reply

Jane Sheeba

Oh Tricia, sorry that you went so far. I’ll see.
Jane Sheeba recently posted..Blogging Action Plan Is HereMy Profile

Reply

Tricia

So sorry. Please disregard my prior question. I found the error in my code. Silly mistake (missed a colon) that I didn’t see even after reviewing the code over and over.

Thank you for your awesome tutorial!
Tricia recently posted..Hello world!My Profile

Reply

Jane Sheeba

Oh glad that you sorted it out :) I just saw this comment after replying to your previous one :)
Jane Sheeba recently posted..Blogging Action Plan Is HereMy Profile

Reply

Ricardus

Awesome tutorial. Don’t have to rely on plugins..

Reply

Jane Sheeba

Yup plugins are third party entities; could slow down your blog :)
Jane Sheeba recently posted..Blogging Action Plan Is HereMy Profile

Reply

Oliver Tausend

Hi Jane,

I googled this topic in order to do it for my new German blog. It worked, just awesome. Thanks a lot for sharing and explaining it so well. Fool-proof ;-)

Take care

Oliver
Oliver Tausend recently posted..MLM Success With Think And Grow Rich And Oliver Tausend Pt. 12My Profile

Reply

Jane Sheeba

Glad that you could use it Oliver :)
Jane Sheeba recently posted..Blogging Action Plan Is HereMy Profile

Reply

Andrew Walker

Oh wow.. This is nice. Thanks a lot for sharing this detailed tutorial!
Andrew Walker recently posted..Shambhala Publications Coupon CodeMy Profile

Reply

Regina

Sheeba,

I’ve got the social icons successfully on my site. However, the problem is when people are zoomed in too far, the buttons overlap my content. How can I make them stick to the side of content box and zoom in and out with the rest of the page, like on your blog?

Thank you,
Regina
Regina recently posted..$5/$25 Pet Supermarket Coupon! Good thru 9/10My Profile

Reply

Scott from Personal Training Certification

Thanks or the straightforward tut. Sometimes the simplest things can appear quite difficult. You broke down the steps well to help us newbies rock the social networks. Thanks
Scott recently posted..How Much Do Personal Trainers Make?My Profile

Reply

Elias

Great post, thank you. If I would like to add the custom social buttons in the header area like you show in your blog, what should I do?

Reply

Jane Sheeba

I’m using a code for adding widgetized header; this means there will be a widget area created in the header. I can then go to the widgets control in the dashboard and add whatever widget I like there - in this case I’ve added a text widget to display social icons.

Reply

Elias

Thank you very much Jane. I really don’t know anything about coding and that is where I feel totally lost. I guess my only exit would be to hire someone to design my site to look exactly how I want to right?

Greetings!

Reply

Jane Sheeba

That’s right Elias! You can try my service if you wish

http://www.probloggingsuccess.com/hire/#Thesis_Theme_Customization

Reply

Elias

I will definitely look at having you help me in the near future. Thanks a lot Jane. Happy late V day :)

Reply

Mike Lamb

Hi Jane. I’ve been trying to add your code for the social icons on my site, but it’s not working. Sorry.

Here is your code with my info.

function floating_icons() { ?>
Follow @mikelamb on Twitter
Become a friend of Mike on Facebook
Contact Us
Subscribe to Internet Breakfast via RSS
 

add_action(‘thesis_hook_before_header’, ‘floating_icons’);

Here is the complete error I get.

Parse error: syntax error, unexpected $end in /home/breakfas/public_html/wp-content/themes/thesis_183/custom/custom_functions.php on line 28

Reply

Jane Sheeba

Mike the code is not correctly showing here due to html. Can you please copy paste your actual code in the contact form and send me an email? I’ll take a look!

http://www.probloggingsuccess.com/contact-jane/

Reply

Akif Shamim

I have checked this but i coudn’t be able to add pinit button and its not working ;/
Akif Shamim recently posted..Unbound Jailbreak iOS Redsn0w 0.9.10b5cMy Profile

Reply

Kelly Vanessa

where do i edit custom_functions.php and custom.css ?

Reply

Shemul49rmc

I want the share button as like yours in this website, how can i get it? is there any post, i searched but nothing found ! Please contact me, i am eagerly waiting for your reply. Thanks.
Shemul49rmc recently posted..Top 10 Most Popular Social Networking SitesMy Profile

Reply

Leave a Comment

Get keyword anchor-texted do-follow backlink by either Tweeting this post, Sharing on Facebook or giving it a +1! All comments are subject to moderation.


  Twitter (ID only. No links or "@" symbols)

CommentLuv badge
 Send me 2 free ebooks. Let me get started as a Problogger!
This blog uses premium CommentLuv which allows you to put your keywords with your name if you have had 3 approved comments. Use your real name and then @ your keywords (maximum of 3)

{ 1 trackback }

  • Jane Sheeba (@FindAllAnswers) (@FindAllAnswers)

Previous post:

Next post: