Page 2 of 2

Re: Custom Header Image

PostPosted: Wed Jun 01, 2011 4:07 pm
by taylor
Hi Claus

Like your background and this is one thing on my wish list. A full picture background, when i try to upload my picture by the options-Background. I get a server error.
Could you tell me how you did this

Regards
Darren

Re: Custom Header Image

PostPosted: Sat Jun 04, 2011 7:44 pm
by Elemee
Hi Claus - Nice look to your site. I too would like to know your technique for the header image.
-Les

Re: Custom Header Image

PostPosted: Tue Oct 18, 2011 6:42 pm
by idive
OK...now I am completely lost. I have read instructions in several places in this blog about replacing the header text with an image. I am looking in the stylesheet section of the code and don't see "welcome header" I found a section marked "header" that seems to have a placeholder section for an image. I tried adding the banner URL and size lines but nothing happens. I think part of the problem here is that I am on the lastest update and some of the posts that address this issue are a year old or so.

Assuming that this section that follows /* This is the custom header image */ is the right area for me to be looking, can someone please tell me what the code should look like? I have tweeked and tweeked it to the point that it is unrecognizable. Is there anything else that needs to be done other than change the code to get the banner image to show up? Thanks for the help!

Re: Custom Header Image

PostPosted: Mon Oct 24, 2011 6:09 am
by slowRoll
I tried the comment before mine about the blog but the blog doesn't even show... :D

Anyways... i did this different as i did not find anything about the welcomeheading... i don't know if this breaks anything but this is what i did:

1. Found the folder structure in my site and found header.php in wp-content/themes/slidingdoor
2. replaced the following: (you can see i commented out)

<!-- <?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?>
<<?php echo $heading_tag; ?> id="site-title">
<span>
<a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
</span>
</<?php echo $heading_tag; ?>> -->
<!--<div id="site-description"><?php bloginfo( 'description' ); ?></div> -->

with this:

<img src="<?php echo esc_url( includes_url( 'images/bannerfinal.jpg' ) ); ?>" alt="your text"/>

3. put bannerfinal.jpg in wp-includes/images

and since i had the banner the size i wanted i did not even added width or height to my img tag...

please let me know if this helps...

Re: Custom Header Image

PostPosted: Thu Feb 23, 2012 9:57 pm
by blocit
Thanks. slowRoll

That worked great for me.

Re: Custom Header Image

PostPosted: Thu Jun 28, 2012 1:55 pm
by wayne
note to self this would be good to incorporate if I do A THEME UPDATE.

THEMEUPDATE

Re: Custom Header Image

PostPosted: Tue Jan 01, 2013 10:36 am
by bluesg
I used slowRoll's method of editing header.php

Works great.

How would I now go about making the logo image clickable for return to Home?

Thanks very much.

Re: Custom Header Image

PostPosted: Wed Jan 02, 2013 5:57 am
by bluesg
Rather than use slowRoll's approach, here's what I did that put the image in and made it click to home. (Hopefully it didn't break anything.)

<?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?>
<<?php echo $heading_tag; ?> id="site-title">
<span>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?> - <?php bloginfo('description'); ?>" rel="home"><img src="http://yoursite/yourdirectorypath/yourimagename.jpg" alt="your text" /a>
</span>
</<?php echo $heading_tag; ?>>
<div id="site-description"><?php bloginfo( 'description' ); ?></div>
<?php endif; ?>

------------

I would prefer to have a relative way to do it, if anyone can suggest it.

Re: Custom Header Image

PostPosted: Thu Jan 03, 2013 12:49 am
by bluesg
I noticed that the image was not aligning to center, so I removed this line:

<<?php echo $heading_tag; ?> id="site-title">

Here is the entire block:

<?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?>

<span>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?> - <?php bloginfo('description'); ?>" rel="home"><img src="http://yoursite/yourdirectorypath/yourimagename.jpg" alt="your text" /a>
</span>
</<?php echo $heading_tag; ?>>
<div id="site-description"><?php bloginfo( 'description' ); ?></div>
<?php endif; ?>

Re: Custom Header Image

PostPosted: Thu Jan 03, 2013 9:35 pm
by bluesg
Okay, so that mangled the alignment of all the body elements. What seems to have worked is to not remove <<?php echo $heading_tag; ?> id="site-title">

but to pasted it just below the span tag.

Here is the entire block:

<?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?>

<span>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?> - <?php bloginfo('description'); ?>" rel="home"><img src="http://yoursite/yourdirectorypath/yourimagename.jpg" alt="your text" /a>
</span>
<<?php echo $heading_tag; ?> id="site-title">
</<?php echo $heading_tag; ?>>
<div id="site-description"><?php bloginfo( 'description' ); ?></div>
<?php endif; ?>