WordPress.org

Ready to get started?Download WordPress

Forums

How to Add a Banner Ad (8 posts)

  1. BBombshell
    Member
    Posted 3 years ago #

    Hi all!

    I would like to add a 720x90 banner ad to my blog, but I'm not sure where to enter the ad code.

    I would like to place the ad between my blog header and the nav bar. I'm assuming I would place the ad code in the header.php, but I have no clue as to where within the header.php.

    Any guidance as to where I should place this piece of code is greatly appreciated!

    Thanks much!!

    My blog: http://www.BrownBombshellBeauty.com

  2. BBombshell
    Member
    Posted 3 years ago #

    Ok, so I almost figured this out on my own, with two exceptions:

    1. I placed the ad code at the very bottom of the header.php. Now the ad is below the nav bar, as opposed to above the nav bar, where I want it to be.

    2. I successfully centered the add, but now every single text, on every single page on the site is centered. I have NO clue how to center the banner ad without centering my whole blog.

    Again, I really appreciate the time and expertise of those who answer questions on this forum!

    Thanks!

  3. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    you could try and add your code just before this line in header.php:

    <div id="navbar" class="clearfloat">

    btw: the closing tag needs to be </center>

    <center><script type="text/javascript" language="javascript" src="http://www2.glam.com/app/site/affiliate/viewChannelModule.act?mName=viewAdJs&affiliateId=1611856497&adSize=728x90"></script></center>

    if that does not work, you could paste the code of header.php into a http://wordpress.pastebin.com/ and post the link to it here; for someone to look at?

  4. BBombshell
    Member
    Posted 3 years ago #

    alchymyth,

    Thanks so much for your help! It worked beautifully, except for when you get to the second page. On page 2 the add is surrounded by a grey box, and the blog itself it totally out of whack.

    What should I do to fix this, as it's looking pretty bad. Here's a link to what's going on:

    http://www.brownbombshellbeauty.com/page/2/

    Thanks for your help!

  5. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    i suggested: before

    however, the ads placement has nothing to do with the display of the 'page 2' - this is also there on page 1, and seems to be caused by the erranaous closing div </div> here in the code (probably of index.php):

    <div id="page" class="clearfloat">
    
    </div>

    (which, btw, is only one of the many validation errors
    http://validator.w3.org/check?uri=http%3A%2F%2Fwww.brownbombshellbeauty.com%2Fpage%2F2%2F&charset=%28detect+automatically%29&doctype=Inline&group=0
    which might cause any unrelated display problems in any browser)

  6. BBombshell
    Member
    Posted 3 years ago #

    I realized my mistake, and placed the ad code in the correct place.

    As far as the closing div, I'm not really too familiar. Should I delete the </div> you mentioned?

    I checked the site you linked to. I had no idea there were so many errors on my site! How do I go about making these changes without screwing up my blog?

    Again, thanks for your help!

  7. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    well done, seems to be working ;-)

    i haven't looked closely at the list of validation errors - however, the ususal way is to start at the top and try to identify in which template file the code is which causes the error - then try to fix it - and don't change anything if you are not sure how to do it right
    ( http://www.w3schools.com/html/default.asp for instance is a source to check for the right code )

    often errors further down in the list will automatically disappear if top errors are fixed.

    some errors might be from plugins, where you only have little influence without deep knowledge of programming; other errors might be from the content of the posts as well.

    re-run the validator inbetween.

  8. BBombshell
    Member
    Posted 3 years ago #

    All seems to be fine in Safari, I guess the other browsers will take a little while to catch up.

    I'll follow your advice and go through the errors and try to work on them.

    Thanks so much for all your help. You rock!

Topic Closed

This topic has been closed to new replies.

About this Topic