You are here: WordPress Video TutorialWordpress TutorialAdd “Logo” To Twenty Ten WordPress

Add “Logo” To Twenty Ten WordPress

by Kimi on July 3, 2010

How to replace WordPress 3.0 twenty ten theme title text by adding a logo image in your header and by editing header.php file, as well as the css style.

Twenty Ten is really cool default theme, but i am sure some of you want to add your own logo to your wordpress blog’s appearance. This can be done by replacing the title text with a logo image. So get your logo ready and follow the tutorial.

Here are the step by step guide.

1. First of all, prepare your logo. In this tutorial, i use my web6 logo which is in .png file, dimension 316×71 px, and mine is called logo.png. Save it in your desktop.

2. Next, we will upload this logo image, you can use ftp, but i use direct upload in this tutorial. blog seo

3. Login to your cPanel, navigate to “wp-content” folder, “themes”, “twentyten”, and then “images”.

Inside this “images” folder, upload your logo by clicking “upload” button in the left top. Browse to your desktop and find logo.png, click “open”.

images folder, and upload button

4. Once it is uploaded to your server, we are ready to go.

5. Next step is we will view page source to understand the code, it can be done by right click anywhere in your window, and if you use firefox, choose “view page source”.

Right click, view page source.

6. Now, login to your wordpress blog admin “dahsboard”, “appearance”, and then “Editor”.

7. Look for header.php and copy paste the content to html editor (notepad or notepad++).

8. Look for this code on line 49 until line 52, and delete it. (i said 57 instead of 47 lol!)

<<?php echo $heading_tag; ?> id="site-title">
<span>
<a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
</span>
</<?php echo $heading_tag; ?>>

Replace it with:

<h1 id="site-title">
<span>
<a href="<?php bloginfo ('home');?>" rel="home" title="<?php bloginfo('name');?>">
<img src="<?php echo bloginfo ('template_directory');?>/images/logo.png" alt="<?php bloginfo ('name');?>" />
</a>
</span>
</h1><!--end of h1 site-title-->

This is how your code of header.php will look like.

8. Paste all the code back to header.php, click “update file” and refresh your blog. Logo should be displayed but it has border.

9. Next is go back to dashboard/appearance/editor, and find style.css. Open it with notepad++, find line 32.

Delete these two lines of code:
border-top: 4px solid #000;
border-bottom: 1px solid #000;


Replace it with:

border:none;

your code should be look like in the following image.

10. Paste the code to style.css back again, “update file”. Refresh your page, and the logo should be displayed.

That’s how if you want to replace the title or add logo to twenty ten wordpress 3.0. I hope you like it!

Video tutorial:

Subscribe new tips via Email:

Was the post helpful? Share it to help others with:

{ 91 comments… read them below or add one }

Harsh Agrawal July 7, 2010 at 11:34 am

Twenty Ten is one of the best free Wordpress theme at this moment and thanks for sharing this useful information… Since all who will be installing Wordpress might be sticking to Twenty ten theme…

Reply

Dina July 7, 2010 at 12:00 pm

@Harsh Agrawal, Hello :)

Yes, i love Twenty Ten as well, easy to customize, and it has a heck lots of new features :)

I notice lots of people using Twenty Ten at the moment, some of them got it cool modified.

Have a nice day Harsh!

Reply

RozaniGhani July 8, 2010 at 9:38 am

I think you have deleted the border of image header of 940px. You should revise this tutorial. By the way, great tutorial! Thank you very much.

Reply

Dina July 8, 2010 at 10:07 am

@RozaniGhani, Thanks for your comment!

I prefer the header without border if i have my logo on, by the way, thanks for this great input :D

Reply

Beth July 12, 2010 at 3:42 am

Thanks so much for taking the time to create this tutorial. Just what I needed!

Reply

Dina July 12, 2010 at 6:55 am

@Beth, You are very welcome! I am glad that it was what you needed, thanks for commenting as well.

Reply

spydeeyk July 15, 2010 at 5:21 am

i’ve Already added a logo to my personal blog.. :D

i don’t know why twentyten can’t show up the logo when i try using bloginfo(‘template_directory’); like your tutorial , so i just upload the logo via media dashboard, and give the full image url link for the logo.. :D

thank you Dina, nice blog anyway.. :)

Reply

Dina July 15, 2010 at 7:38 am

@spydeeyk, hello there. Yeah, that sounds weird that it didn’t work.

But i am glad you found another way, thumbs up!

Reply

xXNelXx July 19, 2010 at 1:41 am

Thank you :)

Reply

Dina July 21, 2010 at 8:20 am

@xXNelXx, You are welcome :D

Reply

Peter July 26, 2010 at 3:01 pm

Hi thanks for the tip just what I was looking for.
Further to Rozani’s comment, I was wondering how I can add the 4px border back to the top of the header image, whilst maintaining border-none on the logo?
Thanks :-)

Reply

Dina July 26, 2010 at 3:58 pm

@Peter, Hi there,

Adding the border to the header image back can’t be applied with the code above, because the logo and the header images are one. Changing attribute to one of them will affect the other with this code.

If we make the code above different, then it is possible, but i havent tried it yet.

Sorry for this.

Reply

Ted Hinkle November 23, 2010 at 1:46 am

Oh wow this is exactly what I need! But I do need to to add that 4px back to the top of my header and not to the logo. When you get the chance can you show us how to do that or how to add a logo without affecting the header? Thank you sooo much for your help!!!

Reply

Kimi November 23, 2010 at 10:20 am

Yes, if i have time, thanks for visiting!

Todd S. Jones July 27, 2010 at 4:48 am

Great post! Thanks!
I too would rather sacrifice the border around the header image. However, if you are unsure, just add the border:none; below the other border styles. CSS will read last style and ignore previous.
border-top: 4px solid #000;
border-bottom: 1px solid #000;
border:none;
clear: both;
display: block;

Reply

Dina July 27, 2010 at 8:11 am

@Todd S. Jones, Hi there,

Well i added border:none above (written in the post) ;) in the style.css file.

Reply

Todd S. Jones July 27, 2010 at 1:00 pm

@Dina,
I’m sorry, I did see that.

I was just noting that there is no need to delete the other border style code.

Just add border:none; below the other border styles. CSS follows the last instruction.

That way if someone wanted to revert back to the original style, they could just delete border:none;

Thanks again,
Todd

Reply

Dina July 27, 2010 at 2:24 pm

@Todd S. Jones, Thanks for the good idea! that or comment the css code.

Another alternative of reverting back to the previous theme files is copy the original file, which we can download from wordpress.org website, and paste back to our theme file :)

Thanks again for your great input, and have a fab day!

Deepak G August 20, 2010 at 9:27 am

I did the same thing.. but its not working… i can see logo.png path in ‘view soure’ but logo i not displaying..please help

Reply

Dina August 20, 2010 at 12:20 pm

@Deepak G, Not sure how to help since i can’t check your url site. But do you use any cache plugins? if yes, you might want to wait a while until you see the changes.

If you follow the video or the tutorial it should work..

Reply

Deepak G August 20, 2010 at 5:29 pm

Now..everything is working perfectly.. can you please tell -
1.How to Increase Sidebar Spacing?
2.How to add Horizontal line in between post on Homepage?
3.How to create a box (about author box) in sidebar (Like labnol.org)..?
4.How to Highlight Post Titles in between two lines or boxes.??

I know, question are more..but you are the only one who is trying to give answers honestly..

Reply

Dina August 21, 2010 at 7:18 am

@Deepak G,

1. What do you mean by sidebar spacing? the font? or the spacing between the content and sidebar? vertically spacing?

2,4. I have to try it first, and then i may want to make tutorial of it.

3. You can use text widget to do this, see one of my post to create about me widget with text widget.

http://www.blog.web6.org/about-me-or-about-author-in-sidebar/

Reply

mike August 27, 2010 at 12:05 pm

Excellent tutorial, just what I needed and worked perfectly, Many Thanks and keep up the good work.

Reply

Dina August 27, 2010 at 3:18 pm

@mike, So glad it worked, yes, i checked your site:)

Good luck with your blog Mike!

Reply

Tim September 8, 2010 at 8:25 am

Really good post, thank you. One thing I wondered about was changing the style.css file. Would it better to create a child theme and create a style sheet in there and then change the code. This way when the parent theme is updated is doesn’t affect your own changes?

Reply

Dina September 8, 2010 at 8:35 am

@Tim, hello there,

I am just creating how to copy the theme tutorial how to copy the default theme so that we are save, incase twentyten updates.

I will publish today, afternoon time.

Thank you for the great input Tim :)

Reply

Nikhil September 10, 2010 at 5:04 am

Dear Dina,
thank you very much for the tutorial.
It was really very simple and helpful.
thanks again

Reply

Dina September 10, 2010 at 4:03 pm

Dear Nikhil,

You’re most welcome, i am really happy if the post can be really helpful.

Regards.

Reply

Alan September 13, 2010 at 1:53 pm

Hi Dina

I really like your blog and the tips are fantastic and easy to understand especially as I’m a beginner to all this. I am creating my first WP site and saw your video on changing the background and adding a border, but I can’t see any post about changing the colour of the Menu bar from black and moving it as you have done above…do you have a tutorial on this?

I’m a web marketing guy and not at all technical so bless you for helping – Keep up the good work, I’m learning loads of good stuff.

Reply

Dina September 13, 2010 at 5:25 pm

Hi Alan,

No, i have no tutorial about changing color of the menu bar from black, but i might create it sometime soon, i am a little busy at the moment.

what do you mean by “moving it as you have done above..”?

Thank you for stopping by and leaving nice encouraging words.

Regards.

Reply

Alan September 13, 2010 at 5:38 pm

Hi Dina

I was referring to your header on this site……….The menu bar on this site is displaying a lightblue background and is displaying above your header and not below as in the default Twenty Ten.

Cheers

Alan

Reply

Dina September 13, 2010 at 5:54 pm

Oh, ok :)

Yes, i modified neoclassical theme, i am not using twenty ten theme, but i guess i will find away to put the menu above the header.

Stay informed Alan:)

Leigh September 17, 2010 at 11:20 am

Nice little tutorial. Thanks, Leigh

Reply

Dina September 21, 2010 at 10:10 am

Thanks!

Reply

mic3000 October 15, 2010 at 5:12 pm

if you work on child-theme and update the theme you lose the changes made!

Reply

Dina October 15, 2010 at 11:15 pm

Hey mic3000, you’re absolutely right.

This is why i recommend to at least make a cope before making any change, quick link: http://www.blog.web6.org/make-copy-before-modifying-twenty-ten/

Thanks for the great input!

Reply

Pedro Matias October 20, 2010 at 7:30 pm

Thanks, that’s a star tut, saved my neck! :)

Reply

Kimi October 21, 2010 at 8:48 am

You’re welcome, Pedro!

Reply

fred October 27, 2010 at 8:37 pm

Thanks buddy. You are a legend!!

Reply

Bradley November 30, 2010 at 7:53 pm

Thank you Dina for your site…you have helped me alot. I was hoping you could help me a little more though.

I followed your instructions to add a logo to my twenty-ten themed wordpress website: westminsterchapelpca.ca

It looks great in IE8 and in Chrome, but I just noticed that in Firefox the image is pushed off to the site. Can you tell me how to fix that?

Thanks alot,
Brad

Reply

Kimi November 30, 2010 at 8:06 pm

Hello Brad,

I have checked your site’s page source, you did it incorrect. Please watch the video again, and check the lines in header.php, you will be able to fix it.

If it does not help, let me know.

Reply

Bradley November 30, 2010 at 9:12 pm

Thank you for the quick reply. I followed the tutorial again, and then double-checked what I had done and I believe I have followed it exactly. (I even reverted some changes I had made to the syle-sheet to change the padding around the logo & description).

I am afraid the issue in Firefox still exists: westminsterchapelpca.ca

Thanks for taking the time to help me…as I said, it looks great in IE8 and in Chrome…why would firefox have an issue?

Reply

Kimi November 30, 2010 at 10:48 pm

Bradley,

I have checked again, and it is not in header.php file but in style.css file.

Look for this line:
#branding img {
border: none;

Notice after “none” text, it should be followed by semicolon “;”

I hope this helps!

Bradley November 30, 2010 at 11:06 pm

Thank you so much! It works great now. I really can’t express how much I appreciate your willingness not only to share these great tutorials and tips, but even to respond to people like me and personally help others out.
God bless you,
Brad

Reply

Kimi December 1, 2010 at 7:04 am

Bradley,

I am happy to hear! Thanks for your nice words, actually by helping others i am learning too.

Do not forget to copy twenty ten folder, in case twenty ten theme has updates, your modification will be gone, unless you do copy it.

Quick link: http://www.blog.web6.org/make-copy-before-modifying-twenty-ten/

Thanks.

Harry Huizing December 5, 2010 at 9:56 pm

Thanks you Dina. I followed the instructions as shown in your blog. Exactly what I needed! I am glad for visiting your site. Thanks en regards from Holland.

Reply

Kimi December 6, 2010 at 5:54 am

Hello Harry,

Just checked your blog, simple but very nice logo you have!

I am glad the tutorial was helpful.

Good luck with your new blog and thanks for the nice comment, Harry!

Reply

Dario December 12, 2010 at 11:58 am

Hi!
I just put my logo in twenty ten instead of text, but how can I remove empty space of that big header image. (as you see I want my old site inplement in wordpress, and it have to look something like this,my new wordpress is still on local comp)
thanks a lot
regards Dario

Reply

Kimi December 12, 2010 at 1:19 pm

Hi Dario!

There are many ways, by putting width=”0″ and height=”0″ for the header image, but i don’t recommend it as it will slow down the site, if you don’t need the image, and it still needs time to load.

You can try it by removing this line from the header.php:

<img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt=""/>

Hope this helps.

Reply

Dario December 12, 2010 at 5:14 pm

Hi Kimi!
It works,thanks a lot for answering
Dario
Croatia

Reply

Kimi December 12, 2010 at 6:11 pm

Dario,

Awesome, happy to hear!

Kimi,

Germany.

Dario December 14, 2010 at 2:13 pm

Hi Kimi!
comunication with You is great, so I have one more question for You. In few words please tel me is it good to make child theme ( or this is whasteing of time ) for wordpress and do You know any good clear step by step tutorial of how to make it
regards
Dario

Reply

Kimi December 15, 2010 at 7:18 am

Hi Dario,

No, it does not waste your time to make twenty ten child, i am going to make tutorial anytime soon too based on this official guide from wordpress.org:

http://codex.wordpress.org/Child_Themes

However i did create a video tutorial how to copy your twenty ten folder as it will go back to default if this theme has an update. By copying twenty ten folder, you will still have your modification.

http://www.blog.web6.org/make-copy-before-modifying-twenty-ten/

I hope this helps,

Talk to you soon!

Kimi.

Reply

Hiral Patel December 17, 2010 at 10:52 am

Excellent work.
Your each and every post are very useful.
Thanks a ton !!

Reply

Kimi December 17, 2010 at 11:18 am

Hiral Patel,

Thanks for your nice comment!

Most welcome,

Kind regards,

Kimi.

Reply

Hiral Patel December 20, 2010 at 11:04 am

Hi Kimi,

Sorry to disturb you but i have one question.
Actually for one of my wordpress blog i used vibrant theme now what i want to do is, i want to create a webinar list and whenever user want to download that webinar it should ask for login or registration and when user will login it should redirect to the same page or else that login page should open on the same page.

now user will be created by me only.

kindly reply asap.

Thanks & Regards,
Hiral Patel.

Reply

Kimi December 20, 2010 at 2:17 pm

Hi Hiral,

I honestly do not have experience in membership wordpress website. You can look for a free plugin membership or try wp membership premium plugin.

Kind regards,

Kimi.

Reply

Hiral Patel December 20, 2010 at 3:13 pm

Hi Kimi,

Thanks for your reply i will try with wp membership premium plugin.

Thanks & Regards,
Hiral Patel.

Reply

Kimi December 20, 2010 at 4:18 pm

Most welcome!

I hope you will find what you are looking for, Hiral.

Kimi.

aswin January 4, 2011 at 7:55 am

Nice post .Also have a look at this also

anewtab.com/add-logo-to-twentyten-wordpress-theme

Reply

JJ Skopek February 7, 2011 at 4:05 am

Thanks so much! You info was very helpful and to the point. Keep up the great work!

Reply

Kimi February 7, 2011 at 8:23 am

You’re almost welcome!

Thanks for the nice comments!

Reply

Lee February 9, 2011 at 8:23 pm

Hi Dina

I have followed your suggestion in this page to add a logo and remove the 940px picture.
Everything works fine but today I viewed through Safari and I still get the box where the head picture was with and broken pic link in the middle.
Can you help?

Reply

Kimi February 11, 2011 at 7:23 am

I have checked your site, it seems to be fine :-)

Reply

Joe Don February 14, 2011 at 3:24 am

Thanks for the help. You’r instructions are amazingly clear and easy to use.

Reply

Kimi February 14, 2011 at 7:53 am

Thanks, Joe!

By the way, I have just checked your blog, and it seems it is incorrect.

Follow the tutorial once again..I notice your header image is somehow float to the right..

Reply

Joe Don February 15, 2011 at 3:14 pm

Can you help me with that. I use safari and it works fine in it but with firefox it goes to the right.

Reply

Kimi February 16, 2011 at 8:14 am

Hi Joe,

Yes, I can and will, but at the moment I don’t have time..

George February 14, 2011 at 5:11 am

Hi Kimi,

Thanks for what you do!!! Just ran across your site. My question is how can I hyperlink the added image to another site?

Thanks so much!

Reply

Kimi February 14, 2011 at 7:57 am

Hi George,

Replace the php code inside the <a href="" to your own link.

Example your link: myothersitelink.com

Implement:

<a href="http://myothersitelink.com">

I hope this helps..

Reply

George February 14, 2011 at 1:57 pm

Hi Kimi

Thanks for your quick reply. I failed to mention that I’m a total newbie. You are an amazing resource. I’m telling everyone I know about your site. THANK YOU, THANK YOU, THANK YOU!!

Reply

Kimi February 15, 2011 at 7:18 am

George!

Thanks for your kindess about telling everyone.

THANK YOU TOO!

Reply

Pablo February 15, 2011 at 5:43 pm

Hi!

I’ve already changed the logo in several sites following your tutorial, thank you very much!!

Now, I’d like to do the exact same thing about the site description, in the upper right part.

It would be awesome if you could point me in the right direction in order to do that, and if not, thank you anyway, you helped me a lot!!

Pablo

Thanks!!

Reply

Kimi February 16, 2011 at 8:15 am

Hey Pablo,

I have posted video on:

http://www.blog.web6.org/twenty-ten-favicon-add-favicon-ico-in-twenty-ten-theme/

Perhaps you can implement by changing the site description with anything you like :-)

Thanks.

Reply

Pablo February 17, 2011 at 1:42 pm

Hi Kimi,

I really don’t see how this “how to change favicon” tutorial is related to how to replace the site description with a picture. I’m not very good about all this wordpress stuff :)

Thank you anyway, you tried to help!
Pablo

Reply

Kimi February 17, 2011 at 6:04 pm

Most welcome, Pablo!

Reply

rohan March 26, 2011 at 12:46 pm

Thanks that was very helpful and easy one Keep up the good work

Reply

Toni April 7, 2011 at 1:19 pm

Thanks! This was very helpful!

Reply

Vir-Cotto May 1, 2011 at 5:12 pm

It kinda works, but when you have a subpage to a mainpage that for e.g. appears in the drop-dwon navigation menu, it doesnt work for that sub-layers. No logo is displayed, its just blank. I dont know why. It should be in the loop.

Reply

Rik May 2, 2011 at 5:15 pm

Hi Kimi,

I am trying out WP as an alternative to my normal (Drupal) just to see what it is like. I have a problem that is likely a noob one that you might be able to help with.

I am applying this tutorial to a child theme, a basic one with just the style.css and header.php files copied over. Everything else is stock. I apply the changes and it looks like it is calling the header.php file from the child directory (I renamed the original in the parent directory, just to clear up any chance of confusion) but it is trying to call the image from the parent/image directory, not the child. Any thoughts? Again, this might be a noob question and maybe there is something else I have to do here. Thanks in advance if you can help.

Reply

Rik May 2, 2011 at 6:32 pm

Ok, I figured this out myself. For the benefit of anyone who may follow…

You need to point to the child directory and bloginfo (‘template_directory’) points to the parent. To point to the child replace that line with this one:

<img src="/images/logo.png” alt=”" />

Then you should be all set.

Reply

Rik May 2, 2011 at 6:35 pm

That didn’t show up for some reason…maybe it is evaluating it as code…but anyway just replace

bloginfo (‘template_directory’)

with

bloginfo (‘stylesheet_directory’)

Reply

Matt June 1, 2011 at 12:11 am

Perfect, just what I’m looking for, thanks!

Reply

Lia June 20, 2011 at 9:40 am

Muchas gracias, estos comentarios ayudan mucho!

Reply

Bento June 20, 2011 at 7:00 pm

Multumesc! Nu stiu cum de nu am dat mai repede de asta! :)

Reply

Will July 6, 2011 at 3:25 pm

Thanks for the easy to follow tutorial. Had this working in minutes. A few people have mentioned that this method removes the border from the header image too. There’s a quick way to fix this which I haven’t seen mentioned here.

Since both the logo and the header image are in the same div you can style the the logo alone by using a first-child selector. The code below (added above the existing #branding div styles) will remove the border on the logo but leave the header image border styles intact.

#branding img:first-child
{
border: none;
}

Hope that’s helpful.

Reply

Stefanie July 6, 2011 at 10:45 pm

Do you know how to change the green panel in theme 687 so that I can use my business logo instead?

Reply

Heino August 24, 2011 at 5:54 pm

Hello!
Thanks for posting, it’s what I needed. I didn’t like the lines around the header pic, so I’m just glad they’re gone.
Heino

Reply

Ninya September 9, 2011 at 1:09 pm

I followed your instructions to the letter and the result was such a big relief knowing that I accomplished something new and good!

Thanks so much for your generosity – my site now looks much better with a logo!

Reply

Pablo September 26, 2011 at 8:53 pm

Hi,

I found great your video, helps me a lot!
I only have one question, how can I adjust the size of my logo, I just unploaded in different sizes but the only one looks fine is the 316×71 px but the logo it is huge! how can I make it smaller?
Thanks for your help!
Pablo
Mexico

Reply

mike December 12, 2011 at 11:16 pm

hello,
all this worked well, changed banner with flash, added logo
Now I would like to have two pictures that go over the header/flash
like in jeweltreefoundation dot org
there is a diamond on top and a lotus in the right corner
can I do this in twenty ten?

I really like the original site, but I just want to use the friendly wp interface.

Reply

Know better? Feedbacks, or Questions? Shoot! :-)

Please use a name instead of blog name or SEO stuff, otherwise it will be deleted right away.

About checkbox → See more my post:how to get rid of spam bots in wordpress post.

Thank you for visiting, you're always welcomed to be here again!

Previous post:

Next post: