• Howdy ??

    I have a quick question about placing adsense within my blog posts. I have put them in the loop to show between the article and the comments section. But I have seen adsense squares embedded in the actual single article like top right or top left. Can anybody point me in the right direction?

    You can see my current blog I am working on here:
    https://www.maineoutdoorstoday.com/blog/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter remdog

    (@remdog)

    ok I will do another google search and hopefully find it this time…

    Wrap the adsense code in a div, place it before the post content, then float that div either left or right.

    Thread Starter remdog

    (@remdog)

    so just something like this

    <div align=”right”><script=adsense code blah blah></script></div>

    begin post content here

    I use basic DIV tags wrapped around my adSense code as you wrote above, but I added some formatting to the CSS file for my theme so that I could have more control over how each ad displays:

    /* ---------------------------------
    - GOOGLE ADVERTISING CSS -
    --------------------------------- */

    .adleft {
    display: block;
    float: left;
    padding: 0 2px 2px 0;
    }

    .adright {
    display: block;
    float: right;
    padding: 0 0 2px 2px;
    }

    .adtop {
    display: block;
    float: left;
    padding: 3px 0 0 0;
    }

    .adfirefox {
    display: block;
    text-align: center;
    padding: 2px 0 0 0;
    }

    .adside {
    display: block;
    text-align: center;
    padding: 10px 0 0 0;
    }

    .adbottom {
    display: block;
    float: left;
    padding: 3px 0 3px 10px;
    }

    Therefore, to use your example above, I would write it into my post as follows:

    <div class="adright"><script=adsense code blah blah></script></div>

    This allows my post text to wrap around my advertising (which I’ve set up to match my site theme as closely as possible.) If you’re wondering about the rest of those classes defined in there, adtop and adbottom apply to the big “Get Firefox” button/banner at the top and bottom of by pages, the adside controls most of the sidebar advertising, and the adfirefox controls the big “Get Firefox” button on the sidebar. You ought to be able to adapt or delete these to work on your site.

    Also, if you haven’t already gotten it, I highly recommend the Adsense-Deluxe plugin from Acme Technologies.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘adsense meshing in with single post’ is closed to new replies.