Support » Themes and Templates » AdSense location quandry

  • kgarner


    Okay, here’s the question. I want ot put adsense banners in two locations, but not at hte same time. I want them in a tower in the menu on the main page. And then I want them between the content on the comments on the article page.
    I am a total PHP neophite (sp?) so any help would be great. I have them in the menu now and they work fine, but I can’t figure out how to get it to switch when in the other mode.
    Obviously I need two different blocks of code from Google, but how do i make them switch.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Mark (podz)


    Support Maven

    Adding adverts to a blog doesn’t involve PHP – you just need to drop the ad-code in where you want it to appear.
    I would carefully experiment with different locations, and with this not really being a WP problem, the design forum wasn’t really the place to put it 🙂



    The reason I thought PHP would be the answer is that I was thinking a if…else if statement to test for some variable. If it was the main page it displays in the menu, if it is a single post it displays between the post and the comments.
    If anyone could just tell me what variable to test for I could probably figure it out. Thanks



    I think I found the answer here. Thanks for looking though.


    You want something like this:
    <?php if ($single) { ?>
    landscape ad goes here
    <?php } ?>

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘AdSense location quandry’ is closed to new replies.