Ads By Google

How To Add A Banner In Your WordPress Header

header-banner-ads

Banner Ads is one of the most popular format for advertisers and publishers alike. That’s because banner ads often occupies the best piece of a blog’s real estate, that is the blog header or on the top of the contents. These areas are the most visible to anyone visiting the blog and those who have a huge readership base charges the most for any banners placed in these places.

Adsense gurus have stated many times that banner ads in the header is not as good a click converter as the large rectangle Ads inside the top portion of the blog post. It is something I agree to, but if you sell ad space, that is the golden area. People who buys Advertisement wants the most visible part of a blog and hence banner ads in the header will fetch a higher price.

To place a banner in your header, you will need to have a header wide enough to accommodate the banner. So if you intend to place a 728 X 90 pixel banner, make sure your header is wide and big enough for that. Also you must take into consideration your header logo and make provisions for that to be displayed fully with the banner.

As always we start with adding a new selector or a div as I like to call it because it is less confusing for noobs. You just need to set the attributes to float the banner and set the margins to align the banner properly. You can omit declaring the width and height as this would allow you to add banners of any size. A simple example will look like this.

.ads {float: right; margin-top: 40px; margin-right: 10px; }

You can of course set your own preferences like floating to the left or have different margins.

Next, go to your header php file and look for the div id of your header image. It will normally looks something similar to this. <div id="header">. If you cannot decide which is which, then go back to your stylesheet and look for the css codes that has your header’s image or logo set as background. That particular selector will be the div id that you are looking for.

Now that you have found it, you MUST insert the banner codes within that id, which means it should be before the closing div tag. If you place it outside the closing tag, you banner will either not appear or if it do, it will not be inside your header. Like for example if your div id is ‘header’, you will have something like this.

<div id="header"> Your header id
<div class="ads">Your new div class that you have created just now must be within this id.
All your banner ad codes here
</div> Closes the div id
</div> Closes the div class

Of course there will be many more lines inside your header php, that’s just a rough guide. As long as you do not delete anything and remember to close your class tags, everything should be okay. In cases where you see the banner not siting properly, you can always go back to your style sheet to re-write the margin spacings. It is a trial and error thing.

Share This Post
Ads By Google
 

Free Updates

Subscribe to receive Free WordPress Theme Tips, Reviews and Discount Codes

Related WordPress Theme Tips

How To Add A Second Header To Your WordPress ThemeJust added a second header to my Theme. When I created this Theme, there was no plans at all of wanting a second header as I don’t have anything that’s...

How To Use Your Own Header Image Size For Twenty ElevenOne big discontention about the Twenty Eleven Theme is the header image. Displaying the image in it’s default size is easy, but if you have custom made an image with...

Video Tutorial – Cutomizing Your WordPress Theme Header ImageWhen I first started dabbling in WordPress Theme Customizations, I was zilch, having completely no prior training in any programming language whatsoever. I learned through sheer arrogance, not believing in...

Kubrik Theme – Adding Navigation LinksAfter adding the sidebar to the Singles Post of the Kubrik Theme which comes in default with your WordPress Installation, there is another missin item that you might like to...

Twenty Eleven Single Post Sidebar With Rotating HeaderWas planning to spend the weekend tweaking the Twenty Eleven Theme so the single post can have a sidebar. But a good soul made a comment in my post on...

Those who found this page were searching for:

  1. wp adding advertisement header
  2. wordpress bannerdiv
  3. add banner to wordpress hwader
  4. how to add banners to header of wordpress
  5. insertig+banner+in+wordpress+header
  6. user different banner in header wordpress
  7. banner wordpress theme
  8. How do you add a clickable ad to your wordpress header
  9. wordpress banner header
  10. add banner adds wordpress

3 Responses to “How To Add A Banner In Your WordPress Header”

Read below or add a comment...

  1. Thanks alot, with the help of your post I was able to finally put up a banner on one of my websites. Easy to understand and well written!

  2. HomeInsights says:

    That worked a treat! This page is definitely going in my bookmark in case I forget. Thannk you very much!