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 trial

WordPress

Adding a logo png, dynamically, to your wordpress

So we are able to change our blog name in the admin but what if we want to use a logo, an emblem logo image? How can we code it so that you'll be able to change it any time you want on the wordpress admin.

This is what I did. I added a custom field named logo and created a field group with url(Iwant it to go to homepage) and image (for the logo).

But the image doesn't display, but It allows me to click and when I click it takes me to home page so I did something right. How can I fully make this work? Any suggestions for those who want to add a logo to our blogs.

Below is the codes I used

1 Answer

<div class="container clearfix"> <header> <div class="grid_6 omega none"> <a href="<?php the_permalink(); ?>"> img src="<?php the_field( 'image-logo' ); ?>"> </div>