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 trialEric Nevitt
4,914 PointsGetting a logo on my custom theme
I'm having trouble getting the logo to show up on my custom theme. The image is in the same folder that the pages are. I don't have it in a images folder, but I will once I get it to work.
I've been doing some research on my problem and there is some PHP code that I'm missing I think.
I think this is the code
<!--LOGO-->
<div id="logo">
<a class="text_logo" href="<?php...?>"><img src="<?php bloginfo('url'); ?>/images/jazzysteez.jpg" alt="" /></a>
<h1><a class="text_logo" href="<?php...?>"><?php bloginfo('name'); ?></h1>
<?php if($option["scl_description"] == "1"){ ?><div class="desc"><?php bloginfo('description')?></div><?php } else { ?><?php } ?>
</div>
9 Answers
Josue Sandoval
946 Points<img src="/images/jazzysteez.jpg" alt="Jazzy Steez" />
Eric Nevitt
4,914 PointsSo my image would go before the php?
Josue Sandoval
946 PointsI think it is best to post the header.php.
This is how my logo code looks. It looks different because they have the option to upload their own logo so it calls in the code:
<div id='header' class='container wrap_logo'>
<?php do_action('main_header'); ?>
<div class='container'>
<?php
echo logo(BASE_URL.'images/logo.png', false, 'strong');
Eric Nevitt
4,914 Points<div id="logo" class="grid_3"><?php do_action('main_header'); ?>
<div class='container'>
<?php
echo logo(BASE_URL.'images/logo.png', false, 'strong');</div><!--end logo-->
Something like this?
Eric Nevitt
4,914 PointsTried the code and it gave me a 500 error.
Eric Nevitt
4,914 PointsGot it working !
Josue Sandoval
946 PointsGood job! :)
The code I posted was for my own site. It was coded a little differently.
Eric Nevitt
4,914 PointsI used the basic HTML. What's the advantage of the other code? Other than the user can place their own logo?
Josue Sandoval
946 PointsEither way is good.
I only did it to make a template where they can upload an image and set it as the logo. Please let me know what you think of the colors I used in a navigation bar I am working on:
https://teamtreehouse.com/forum/feedback-on-the-colors-in-my-navigation-bar