Automatically putting Adsense code after the first paragraph

Discussion in 'Google' started by MelogKnaj, Jul 4, 2008.

  1. #1
    I am using Wordpress and Whydowork adsense and I am trying to figure out a way to set it to put the adsense code after the first paragraph. Anybody have know a plugin to do this or a way to do this besides entering it manually?
     
    MelogKnaj, Jul 4, 2008 IP
  2. zac439

    zac439 Notable Member

    Messages:
    3,074
    Likes Received:
    214
    Best Answers:
    0
    Trophy Points:
    260
    #2
    You could create a custom plugin if you had the time and weren't scared to try.

    One way of doing it would be to explode the article based on newline characters, so it places each paragraph in an element in an array. Then it's simple as pie to just use a loop and place code after the first element in the array :).

    If you don't feel like going through that sort of trouble, I would investigate other Adsense plugins. One in particular put Adsense boxes in the middle of the content. I'm sure you could alter it fairly easy if you are adept in PHP.

    Good Luck!
     
    zac439, Jul 4, 2008 IP