IE7 and IE8 display issue is fixed!
Changed the background position from “-3.2em” to “32px.” Changed width from “3.2em” to “32px.” Simply make those changes and it should work great! Thanks to gtalbot.org, who listed it as number 37 of 171 allegedly fixed bugs in IE 8 [fixed as of 6001.18343]. Sorry I didn’t notice this sooner, guys!
Social Icons Code Update: 8/14/2009
The code for this tutorial has been updated in the text, with a new video coming momentarily. Please make sure that you make the proper adjustments. This now validates like a mofo ![]()
Share Yourself In Under Seven Minutes
So, as I sit here and get severely tortured by my wife’s new obsession called “More To Love”, I figured I should share a really awesome way to display some social networking icons, RSS and email just like you see to the left on my site. In less than 7 minutes you will be able to connect your readers/users/subscribers to your Twitter, Facebook, RSS and Email all using Thesis Hooks. Below is the code you need to make it all happen.
Put This In Your Custom_Functions.PHP
function social_iconz() {
?>
<div id="feedback"><a href="http://twitter.com/yourusername" id="twitter">[your name] on Twitter</a><a href="http://facebook.com/yourusername" id="facebook">[your name] on Facebook</a><a href="Your RSS Feed URL" id="rss">[your] RSS Feed</a><a href="mailto:youraddress@whatever.com" id="email">[your] Email</a></div>
<?php
}
add_action('thesis_hook_after_html','social_iconz');Put This In Your Custom.CSS
.custom #feedback { background: transparent; width: 3.2em; position: fixed; top: 40%; left: 0.25%; }
.custom #feedback a { display: block; text-indent: -9999px; height: 32px; outline: none; }
.custom #feedback #twitter { background: url('http://thesistutor.com/wp-content/uploads/2009/07/twittericon.png') no-repeat 0 -32px; }
.custom #feedback #twitter:hover { background-position: 0 0; }
.custom #feedback #facebook { background: url('http://thesistutor.com/wp-content/uploads/2009/07/facebookicon.png') no-repeat 0 -32px; }
.custom #feedback #facebook:hover { background-position: 0 0; }
.custom #feedback #rss { background: url('http://thesistutor.com/wp-content/uploads/2009/07/rssicon.png') no-repeat 0 -32px; }
.custom #feedback #rss:hover { background-position: 0 0; }
.custom #feedback #email { background: url('http://thesistutor.com/wp-content/uploads/2009/07/emailicon.png') no-repeat 0 -32px; }
.custom #feedback #email:hover { background-position: 0 0; }Special Cases
Special cases will be updated as I discover them. Special cases can, from time to time, cause HTML validation errors. The errors are NOT a product of my work, but are issues with the way that sites such as Delicious and StumbleUpon work their magic. If you have a validation concern, please email me.
For Delicious, the CSS principle stays the same but what goes into custom_functions changes.
<a href="http://delicious.com/save" onclick="window.open('http://delicious.com/save?v=5&noui&jump=close&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title), 'delicious','toolbar=no,width=550,height=550'); return false;" id="delicious">Bookmark this</a>For StumbleUpon, the CSS principle stays the same but the custom_functions changes.
<a href="http://www.stumbleupon.com/submit?url=<?php the_permalink(); ?>&title=<?php the_title(); ?>" id="stumbleupon" target="_blank">Stumble</a>
AND DON’T FORGET!
You are WELCOME to use the images I have made for YOU! In fact, if you want me to make others, I will!
Here are the ones I can make:
- AIM
- Apple
- Bebo
- Blogger
- BrightKite
- Delicious http://thesistutor.com/wp-content/uploads/2009/07/deliciousicon.png
- DesignFloat
- Digg http://thesistutor.com/wp-content/uploads/2009/07/diggicon.png
- Dopplr
- Flickr http://thesistutor.com/wp-content/uploads/2009/07/flickricon.png
- FriendFeed http://thesistutor.com/wp-content/uploads/2009/08/friendfeedicon.png
- Gamespot
- GoogleTalk
- Last.fm
- LinkedIn http://thesistutor.com/wp-content/uploads/2009/07/linkedinicon.png
- Mixx
- MobileMe
- MySpace http://thesistutor.com/wp-content/uploads/2009/07/myspaceicon.png
- NetVibes
- NewsVine
- OpneID
- Picasa
- Plurk
- Posterous http://thesistutor.com/wp-content/uploads/2009/07/posterousicon.png
- Skype
- StumbleUpon http://thesistutor.com/wp-content/uploads/2009/07/stumbleuponicon.png
- Technorati
- Tumblr
- Viddler http://thesistutor.com/wp-content/uploads/2009/07/viddlericon.png
- Vimeo http://thesistutor.com/wp-content/uploads/2009/07/vimeoicon.png
- Virb
- Windows (though I won’t be happy)
- WordPress
- Yahoo
- YahooBuzz
- Yelp http://thesistutor.com/wp-content/uploads/2009/07/yelpicon.png
- Youtube http://thesistutor.com/wp-content/uploads/2009/07/youtubeicon.png
How To Get Your Icon
In order for me to make an icon you may either leave me a comment on this post or send me an email by clicking the little mail image to the left of the screen.
Don’t Forget To Pick Up Your Copy Of Thesis!
Also, help keep Thesis Tutor alive by donating!
{ 6 trackbacks }
{ 177 comments… read them below or add one }
← Previous Comments
Ya I would love if no one ever used IE!
Great stuff, thanks. I would also like a Linkedin button. and if you could create a button for your Tutorials I would insert that too! Thanks
I’d love the icons. Well done.
I’d love linkedin that is.
Matt,
The icons won’t show on my Simply Blog dot net site but works fine on my Miguel Wickert dot com site. When you get a chance, if ya don’t mind, I’d appreciate your help. My guess, something in the site’s CSS or PHP is to blame. Thanks in advance for your help.
@Miguel
I don’t see the html at all on simply blog, nor do I see any relevant CSS. The only advice I can offer is to copy and paste again.
hey Matt,
Oh man, sorry. I had it on but is wasn’t showing so I removed it. I did notice something in the footer trying to appear but it was weird. I’ll try again, leave it so you can take a look.
Matt,
Okay, the code is in place and isn’t showing. Look at the footer of the site. Strange?
@Miguel
You aren’t using the CSS from the tutorial.
Really? it worked on one of my sites but not the simply blog.net site? I applied the copy listed here on the site.
@Miguel
I see the issue. Your “social home” page has CSS that is interfering with the CSS from the tutorial. Simply change the id’s in custom_functions to something like twitter2 and make the appropriate changes in the CSS and all will be well.
@Miguel
You need text in the a tags and you need to remove the PHP that is in your custom.css file [not sure how that got there]. Then go through and make sure that ALL of the ids are correct [for your site]. Then try again.
hey man, thanks again for all the help but I cannot get it working, at least on site we’ve been discussing.
Anyhow. Thanks again.
Really great tutorial, but I have a silly question: Do I have to have the icons butting up against the edge of the screen? HOw can I move them closer into the body of my blog? Thanks!
I love this. One small question:
What is the code to have the icons hover over the “right” side rather than the left side of one’s blog?
Thanks.
Hi Matt,
Love the social icons! And I love the tutorials – awesome.
Can you make me a Stumble Upon, Delicious and Digg icon?
Thanks and keep up the great work!
@Moni
In the CSS in the tutorial, on the first line you will notice something that says left: 0.25%. Simply adjust that percentage to your liking.
@Bill
Simply change the word “left” to “right” on the first line of CSS.
@Glenn
Please check the icons above. They are there. Also note the “Special Cases” section.
Hi Matt,
Doh! I didn’t see the icons I was requesting earlier. Got them. Thank you!
I can’t get the youtube icon to show up. I put everything in and the site made a space for it and when you roll over it it says youtube and links to it, the icon is just missing. Any ideas?
Matt,
Yep, that did it. I’d tried that before, but unsuccessfully.
You must have the touch!
Thanks for all your lessons. You show people how to “get under the hood” without getting grease all over themselves
Any chance of making an iTunes button? I love them!
Hi, I am using thesis 1.6 with a full-width frame when I entered the css the icon did not show up and my background for my header disappeared. Any ideas
thanks
Hi Matt,
Is there a way to adjust the position height of the social icons from the top of the page?
Thanks in advance and thank you for making such cool icons!
@Ana
You are welcome to send me your site.
@Glenn
Simply open the custom.css, and adjust the declaration that says “top: ” Change the percentage to your liking. To put it on the right, change the word “left” to “right.”
Hi mat, why the icon not shown in my blog? Please help me, i have use thesis and do all the things like you say in the tutorial.. Help me please..
I have another problem, the icons had shown, but the position is not in the middle like yours. it is in the bottom of my site, can you help me please..
Oh my god, thank you man, this is working, the fault is i miss the dot “.” in the first line… thanks..
Sorry to bug you again. I am really confused about what is going on with my icons. I put in the youtube icon exactly like the other ones and the link is working, but the icon will not show up. If you have a chance can you take a look and see what I’m doing wrong? It’s probably just something stupid I’m doing wrong. Thanks for the help and for the icons. The ones that work look GREAT on the site!
@Jennifer
Go to your custom_functions.php file and make the “Y” in id=”Youtube” lowercase. That’s all you have to do
I’ve added the code, and made some modifications per the thesis forum, however its not working for me, I am only getting a line of text with clickable links at the top of my blog. What am I doing wrong? Hope you can help!
@Claire
In your custom.css put “*/” on the line immediately after “http://diythemes.com/thesis/rtfm/customizing-thesis-with-customcss/”. You accidentally erased it when you pasted in the code.
Thanks for getting back so quickly, I cannot believe it was that simple, a bit embarrassed, but so glad its working now, you rock!
That did it. Thank you for the help! And thank you for the icons and tutorial. I love the icons. They look great. Thanks again!
Hi mate
absolutely amazing post. everything works great for me except the delicious bookmark. it basically takes me to the first page of delicious instead to the save page
plz let me know
tnx again
oh and one more thing
my stumbleupon icon tries to save only a specific blog. i dont know why it chooses that specific one so if you could please take a look at that as well
tnx
You are a legend! Great work.
I’m trying this on our test site and I’m not getting it. Cut and pasted code, copied your icons to my directories and adjusted the urls for those. The links appear at the bottom of the page as text. I’ll send you the url.
If you could take a look, I’d really appreciate it.
Joel
@Joel
Insert a “*/” somewhere before the CSS for the feedback. You have unclosed comments.
@Yiannis
Stumbleupon is simply responding to the address that you entered into it. If you change the address, it will change what it saves. Delicious is working fine for me.
@Craig
Thanks, man. Keep visiting and let me know if there is ever anything you need.
the URl for my test site is ccinodesign.com/blog
I can’t seem to figure this out with the Thesis 1.6. I tried following your instructions and ever time I do it, my site disappears and I get an error message that says like 20 of CSS code is incorrect. Any help would be greatly appreciated.
@buck daddy
The issue is unquestionably in your custom_functions, as that is the only thing that can cause an error of the type you are reporting. Go to line 20 of your custom_functions and make sure you don’t have any rogue spaces or periods. Also make sure you aren’t missing any semicolons. The code definitely works so make sure it is entered exactly as I have it. Copy and paste first, then go through and adjust. Let me know how it turns out.
I am back and trying this again. Seems that it works nicely in IE but in Firefox the icons are sitting at the bottom of the page.
Thank you Matt.
Mary Ann
Awesome work. Really a simple and compelling application.
Very cool. I had issues with using Open Hook. When it code was added to the before HTML hook I got a parse error for an unmatched }. Cutting the same code out and placing it in the custom_function.php made it work great!
Wow, this is cool! But my icons are showing up at the bottom of the page.
Any ideas?
Thanks!!
@Chris
In the very first “.custom #feedback” you are missing the “.” before “custom.” 99.999999999% of the time the error is just that simple
Ha! Thanks! Have a great day.
@ Matt
i managed to get it but not how it’s supposed to i guess
i changed no-repeat 0 -32px into no-repeat 0 0 and now they show up
the only downside is i still can’t get the hover effect
Where can I find a matching tumblr icon?
Got It!!!
created hover icons, but to add padding 8px to get it right
check on http://www.carlovanderpluijm.com
thanks
Great work Matt! Can I get the icons?
Hi Matt,
Are Google Reader or Foursquare on the table for icons you can make?
Thanks.
Easy installation and worked like a charm. thank you for the great mod.
Awesome stuff
However i’m struggling to get these to display on my website.
-Jason
@Jason Schappert
You need to re-copy the code in custom_functions.php. Yours was simply entered incorrectly.
Hey Matt,
Thanks for the reply, sorry to keep being a pain.
I copied it just like it is on the site and it still won’t come up. If you scroll down to the bottom it just comes up as a bunch of invalid text links
Sorry to bug you again,
Jason
@Jason Schappert
No worries. The id=”twitter” and so on are all messed up. they must exactly match what I have in the tutorial.
Copied it just like the video and still no luck
could it be a tag conflict?
@Jason Schappert
I looked at your site again and the id’s are still not right. So I can show you what I mean, I am including some pics of what is currently in your site’s HTML markup. You will see that the id’s do not match what is in the tutorial.
feedback
twitter
facebook
Each of those should read:
id=”feedback”
id=”twitter”
id=”facebook”
ALL of your id’s suffer from the same problem.
The icons will NOT work until the id’s match exactly what I have in the tutorial.
Thank You!
Ok Matt I have to admit I thought you were going crazy!
I didn’t see any of those forward slashes when I was editing in Openhook. However I saw what you saw when I looked at my source page.
So I opened it up in a text editor. Took out the forward slashes and FTP’ed the file to the folder to avoid openhook and BAM!
You my friend are very good.
Thanks,
Jason
Thanks a lot for the tutorial. This type of icons is precisely what I was looking for!
Great work man. From many days I was searching for this feature & finally got her. Thanks.
I’m having an interested problem with this at http://greenyourdecor.com
The links are all there, but the icons are showing up only upon rollover. You can see them until you roll over them. I have them on the left side, and they are there although you can’t see them. Any idea why?
I had to make slight changes to the code because my icons are 40 pixels wide. Could that be the problem?
← Previous Comments