Replacing Title/Header with an Image?

Any questions about styling and customising the layout, changing the number of columns, changing the number of sliding images and so on.

Re: Replacing Title/Header with an Image?

Postby dneal » Sun Feb 12, 2012 6:50 pm

How do I link the my header logo to the "Home" page? As there is no "Home" page (nor do I know how to create a Menu spot for this), I need to link my logo as a way to get back "Home". I did see the post "add <a href=" your web domain here"> tag to it", but I'm not a coder & am not sure exactly where this should go. I've tried several places, but it messes up the sliding images. Thanx for any help on this!
dneal
I'm a regular
 
Posts: 8
Joined: Sun Feb 12, 2012 12:27 am

Re: Replacing Title/Header with an Image?

Postby MattB13 » Wed Feb 15, 2012 11:45 pm

dneal wrote:How do I link the my header logo to the "Home" page? As there is no "Home" page (nor do I know how to create a Menu spot for this), I need to link my logo as a way to get back "Home". I did see the post "add <a href=" your web domain here"> tag to it", but I'm not a coder & am not sure exactly where this should go. I've tried several places, but it messes up the sliding images. Thanx for any help on this!


Im by no means an expert (in fact, Im about to beg for help myself in a minute...!) but, I believe you put your <a href=" your web domain here"> in with your image source info:

Code: Select all
<span>
<div align="center"><a href=" your web domain here"><img src="wp-includes/images/phoenixphotos.png" width="450" height="87"></a></div>
</span>


Now, I could be completely wrong, or it might be that you need some extra bits aswell, but give this a go - hopefully it might at least get you going!

My question is, Ive followed the advice from JordanT, and have the following code:

Code: Select all
<body <?php body_class(); ?>>
<div id="wrapper" class="hfeed">
<div id="header">
<div id="masthead">
<div id="branding" role="banner">

<?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?>
<<?php echo $heading_tag; ?> id="site-title">
<span>
<div align="center"><img src="[b]wp-includes/images/phoenixphotos.png" width="450" height="87"> </div>[/b]
</span>
</<?php echo $heading_tag; ?>>


As a couple of folks have mentioned, this works fine on my front page (About Us) but not on any of the other pages? Could someone please tell me why? Or at least give me hint?

Site is http://www.phoenix-photos.co.uk so you can see whats what!

Thankyou all!!

Matt
MattB13
I'm new here
 
Posts: 3
Joined: Tue Feb 14, 2012 11:58 pm

Re: Replacing Title/Header with an Image?

Postby MattB13 » Thu Feb 16, 2012 9:53 pm

Right - Ive fixed my issue with the header image not appearing on all the pages.

I quite simply changed my Permalink settings back to default, and hey presto! 8-)
MattB13
I'm new here
 
Posts: 3
Joined: Tue Feb 14, 2012 11:58 pm

Re: Replacing Title/Header with an Image?

Postby KARadio » Fri Mar 16, 2012 7:46 pm

I have managed to post the image - however it disappears in Firefox and Chrome, as far as I can tell, have pasted my code below - can you tell me/show me how to edit it so it no-long disappears after the page has fully loaded?
It shows and doesn't disappear on other pages, just not on the main page.
</head>

<body <?php body_class(); ?>>
<div id="wrapper" class="hfeed">
<div id="header">
<div id="masthead">
<div id="branding" role="banner">

<?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?>
<<?php echo $heading_tag; ?> id="site-title">
<span><div align="center"><img src="http://ka-radio.co.uk/images/banner3.jpg" width="940" height="200"> </div></span></div>


<div id="imageMenu">
KARadio
I'm new here
 
Posts: 3
Joined: Thu Mar 15, 2012 1:03 am

Re: Replacing Title/Header with an Image?

Postby suniram » Mon Mar 26, 2012 3:57 pm

Yes changing from permalinks back to default in wordpress does the trick and the picture shows like wanted. But permalinks are a fine thing and everybody wants to use it. So is it possible to use permalinks and have the picture showing on every page?
suniram
Legend!
 
Posts: 11
Joined: Sun Sep 05, 2010 7:54 pm

Re: Replacing Title/Header with an Image?

Postby JR303 » Wed Jan 08, 2014 10:50 pm

Okay, so I have screwed up my site a bit. My header is now only showing text where an image should be. http://johnreedphotography.com/ Here is a link to my site.

Here is the css in my header.php file. I have messed up something trying to get my image to link to my home page.
Code: Select all
<?php
// Check if this has header image
if ( $img_src = get_header_image ()  ) :
  ?>
<?php header_image(); ?>
<?php else: ?>

<?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>
<?php endif; ?>

   
                     
            
            
            


            <div id="imageMenu"  <?php if (!is_home() && !is_front_page()) echo "style=\"display:none\" " ?>


If anyone is able to help it would be greatly appreciated. Or if you can send me on my way to find the original code I will change it all again.

Thank you,
John Reed
JR303
I'm new here
 
Posts: 2
Joined: Wed Jan 08, 2014 10:46 pm

Re: Replacing Title/Header with an Image?

Postby JR303 » Fri Jan 10, 2014 10:24 pm

And, got it. Nevermind.

Working, finally. Wish I had decided to make use of a child theme from the beginning.

John
JR303
I'm new here
 
Posts: 2
Joined: Wed Jan 08, 2014 10:46 pm

Previous

Return to Advanced - Customising the theme