Skip to:

Where to put adsense code?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Your image link returns a 403 Forbidden error, a direct link to your website would be much easier to work with anyway. I’d recommend putting it in header.php and using either tables or CSS to align it to the left of the main content.

    Incredible fast response, thanks!

    I corrected the link, please try again.


    I don’t usually work with adsense so I don’t know what the div it’s in is called. If you can post a link to your site with AdSense running I can probably work out some CSS though.

    URL is:

    Thanks again,


    Olaf Lederer


    Hi, to place an ad box like this you need to tweak the existing theme.

    Try to open an extra div container inside the header tpl file and close the container inside the footer tpl.

    inside this container you can place the forum plus a banner (of course you need to change some css code)

    EDIT: btw adsense doesn’t have a great CTR for forums

    Thanks for your reply Olaf, but I think this is beyond my understanding.

    Can you please elaborate?



    Okay I can’t work out how to get it to position relative to the theme, since it just… disappears if I try aligning it properly at left: -1000px. Putting <div style="position: absolute; left: 100px;"> and </div> around it will put it on the left of the screen outside the layout though, just fixed against the side of the screen rather than the layout.

    @Olaf: this theme does some awful things if you try aligning anything to its left using a div :(

    Olaf Lederer


    just example code…

    header.php (the two divs between body and wrapper)

    <body id="<?php bb_location(); ?>">
    <div style="position:relative;width:1200px;border:1px solid red;margin:0 auto;">
    <div style="width:120px;left:0;top:200px;position:absolute;height:600px;background-color:yellow;"></div>
    <div id="wrapper">

    footer.php (the div before the action)


    <?php do_action('bb_foot'); ?>


    I checked this only i firefox (Ubuntu) and of course the header background image is only between the new container (put the background into the body style.


    before you’re able to tweak themes you need to know some CSS


    I copied the code into header.php and tweaked it a bit to show the ad. Here’s the result:

    Thank you so much.

    P.s.: ik zie net in je profiel dat je ook uit Nederland komt!

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.
Skip to toolbar