AdSense location quandry (5 posts)

  1. kgarner
    Posted 11 years ago #

    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.

  2. Mark (podz)
    Support Maven
    Posted 11 years ago #

    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 :)

  3. kgarner
    Posted 11 years ago #

    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

  4. kgarner
    Posted 11 years ago #

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

  5. Anonymous
    Posted 11 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.