If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.
May 4, 2011 at 9:55 pm #4153May 5, 2011 at 12:09 pm #45206
in header.php add your banner code after:
<h2 class="logo ie6fix <?php echo $logoclass; ?>"><a>/"><?php echo $logo; ?></a></h2>
Ifyou like you can position it by wrapping it in a div – i.e.like:
At least add following css to style.css:
Obviously you can adjust the css class and the position as you like.May 8, 2011 at 1:24 am #45207
I’m sorry, I meant an avert banner in the upper right corner of the header file. Right below the twitter and feeder icons, here’s my sight:
I tried this code: <div align="right" style="position: absolute; top: 50px; right: 0; z-index:10;"><a href="http://innohealthed.org/healthpreneurs.html"><img src="addesign.gif" /></a></div>
But it doesn’t work properly. I would appreciate your help.May 8, 2011 at 5:07 pm #45208
<div style="position: absolute; top: 50px; right: 0; z-index:10;"><a href="http://innohealthed.org/healthpreneurs.html"><img src="http://my-website.com/addesign.gif" /></a></div>May 9, 2011 at 1:03 am #45209
Tried it, and it doesn’t work. I must be doing something wrong. Can’t figure it out???May 9, 2011 at 5:08 am #45210
I couldn’t find the banner code on your website. Please leave it – maybe it’s just a smal php problem or the image url isn’t right. Wuithout code I can’t investigate what’s going wrong….May 9, 2011 at 11:57 pm #45212
Want to put your new banner ad on your own website or homepage?
It’s easy, just follow these steps:
1. Download your ad to your PC/Mac as described above (or receive it via email if you prefer);
2. Upload your ad from your PC/Mac to your webpage (if you need help uploading, please contact your webpage host’s support materials);
3. Add the following HTML code to your webpage so that it loads and displays your new banner ad:
<img src="addesign.gif" /> (this code will simply display your ad - clicking on it will do nothing)
(if you uploaded your ad using a different file name, change “addesign.gif” to the file name you used)
OR use the following HTML code to display your banner and cause people who click on it
to be taken to a specific page on your website:
<a href="http://www.innohealthed.org/anypage.html"><img src="addesign.gif" /></a>
(if you uploaded your ad using a different file name, change “addesign.gif” to the file name you used).
That’s all there is to it – your ad should now appear on your webpage for all the world to see and enjoy!May 11, 2011 at 4:51 am #45214May 11, 2011 at 7:05 pm #45215
No, i didn’t find a solution yet. I submitted to you the directions for my avert banner. I still can’t figure how to put in on my website.May 13, 2011 at 5:11 am #45216
I think the problem is the link to your image. Please make the modification in header.php (like I instructed above) and leave it. I’ll investigate the site with firebug afterwards.May 13, 2011 at 8:51 pm #45217May 14, 2011 at 6:06 am #45218
I was right. The url: http://innohealthed.org/addesign.gif is wrong and doesn’t point to an image. I.e. if you try to insert your logo like:
<div style="position: absolute; top: 50px; right: 0; z-index:10;">
it works because the image exists. However http://innohealthed.org/addesign.gif doesn’t exist. You need to upload the image to the main server directory or (better solution) you put it in wp-content/uploads folder – the path would be http://www.innohealthed.org/wp-content/uploads/addesign.gif then.May 15, 2011 at 12:39 am #45219
Perfect!! Thanks for your patients and time you given to help me. I appreciate it immensely.May 15, 2011 at 12:55 am #45220May 15, 2011 at 8:17 am #45221
Yes – just replace http://innohealthed.org/healthpreneurs.html with the permalink of the post you want to link to.May 15, 2011 at 1:57 pm #45222May 15, 2011 at 1:58 pm #45223May 15, 2011 at 4:49 pm #45224January 23, 2012 at 9:21 pm #45225
The topic ‘How to add a banner to the header’ is closed to new replies.