Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialtimegan
Courses Plus Student 1,188 PointsUsing 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
Omar Zeidan
8,893 PointsIt can be accomplished in two different ways:
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.
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" />
Omar Zeidan
8,893 PointsYou 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.
timegan
Courses Plus Student 1,188 Pointstimegan
Courses Plus Student 1,188 PointsHi 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.