putting adsense inside psts in wp

Discussion in 'Blogging' started by superpump, May 13, 2006.

  1. #1
    So right now on my health blog, the ads are appearing on my home page after the title of each post. Is there a way to do it so the ads only appear at the top of the post when you are actually inside the article?
     
    superpump, May 13, 2006 IP
  2. tyrithe

    tyrithe Member

    Messages:
    97
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #2
    The following should work to display your adsense block only when a single post is being displayed.

    <?php if (is_single()): ?>

    <!-- your adsense here -->

    <?php endif; ?>
     
    tyrithe, May 13, 2006 IP
  3. superpump

    superpump Peon

    Messages:
    1,419
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #3
    ok thanks, now in which filedo I put this?
     
    superpump, May 13, 2006 IP
  4. tyrithe

    tyrithe Member

    Messages:
    97
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #4
    If you're using the adsense deluxe plugin, you can place the <?php ...> lines around your pasted adsense code in the options editor.
     
    tyrithe, May 13, 2006 IP
  5. websys

    websys Active Member

    Messages:
    841
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    78
    #5

    single_post.php is the file
     
    websys, May 14, 2006 IP