Site logo

Archived topic

Different "logo" on home page

11 replies · Started by Christa Hutchins on December 28, 2015

Viewing posts 1–12 of 12

At the top of all my pages, I have the nav bar, then a header that is only an image loaded as the logo, then a "below the header" hook with my subscriber bar and social icons. I would like to have the current header/logo image on the home page and a different image in that space on all the other pages and posts. What is the best way to do this?

Site is wwww.doanewthing.com

Thanks!

Pretty sure I copied your directions exactly, but that didn't work. I left it so you can see what happened. It put both headers on the Home page.

You'll need to remove the logo from "Customize > Site Identity" as you've added it using GP Hooks.

Wait ... I thought I was adding the custom_header using the hook. If it didn't find the custom_header on a page, it would add the default. The pages without custom_header defined are showing only the default, which is what I want. The home page is showing both the default and the custom when I only want the custom. Did I misunderstand what we were doing?

No you're right, but it looks like you still have a header added via "Appearance > Customize > Site Identity", which is why it's showing twice.

Have you checked to see if your logo is added in that area still? If it is, remove it and everything should work.

I do have the pretty image as the logo. If I don't define it there, how will it know to use that image instead of the custom one on pages where it doesn't have custom_header? I don't specify that image anywhere else

You define it in this part of the code:

<?php else : ?>
      <img src="URL TO MY DEFAULT LOGO" alt="" />
<?php endif; ?>

Duh! I missed that part! It still says "URL TO MY DEFAULT LOGO" Ha ha!!

Once that's updated and your logo in the Customizer is removed you should be good to go :)

It works! I need to play around with the size/spacing/padding of the pretty image .... I don't want the white space around it, but it's basically right. Thanks so much!

You're welcome :)

This archived topic is closed to new replies.