Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

WordPress From Bootstrap to WordPress Create Bootstrap Styled Theme Templates The Header and Footer Templates

Using an image/logo in the header

How to configure the header.php and css to display an image like a logo in place of the site title?

2 Answers

It can be accomplished in two different ways:

  1. Sometimes the theme you are working with an in the its user interface you might find an option telling you to upload the logo to use it instead of the title.

  2. If not then you can go to the header.php and you simply can add your logo using the wordpress relative url such as :

<img src="<?php bloginfo('template_url'); ?>/images/mylogo.gif"  width="120" height="120" border="0" alt="SiteName" />

Hi Omar,

Thanks for the information. I will give it a try. Also, do you happen to know how to code the theme to allow for a logo in place of the title? Like you mentioned, some themes have that option. I would like to hard code it into the theme.

You are more than welcome, yes sure the code I just added for you you can use it in the header.php and you hard-coded it there the way you want.