Adsense between blogposts in homepage of wordpress blogs

Discussion in 'AdSense' started by theprince, Nov 13, 2009.

  1. #1
    theprince, Nov 13, 2009 IP
  2. internetmarketingiq

    internetmarketingiq Well-Known Member

    Messages:
    3,552
    Likes Received:
    70
    Best Answers:
    0
    Trophy Points:
    165
    #2
    You can hard code it into the template file.
     
    internetmarketingiq, Nov 13, 2009 IP
  3. theprince

    theprince Well-Known Member

    Messages:
    455
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    130
    #3
    how do I can do that??
     
    theprince, Nov 13, 2009 IP
  4. sultanofseo

    sultanofseo Notable Member

    Messages:
    9,930
    Likes Received:
    405
    Best Answers:
    0
    Trophy Points:
    265
    #4
    login to your admin panel and find the main index file under your site editor. you can hard code the adsense code there
     
    sultanofseo, Nov 14, 2009 IP
  5. Doloboy

    Doloboy Peon

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I'll bite...

    /wp-content/themes/YOURTHEMEFOLDER/index.php

    Look for
    
    <?php if(have_posts());?>
    <?php while(have_posts()); the_post();?>
    PHP:
    You can put custom HTML & PHP Code after this.


    This will load that ad every single time after (or before depending on where you put it) a post on your homepage only.
     
    Doloboy, Nov 15, 2009 IP
  6. theprince

    theprince Well-Known Member

    Messages:
    455
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    130
    #6
    This will work if you want to add an ad under the title in the fisrt post in the homepage but what if you want to add an ad between the 2nd and 3rd post on your homepage, any ideas or plugins for wordpress that can do that?
     
    theprince, Nov 16, 2009 IP
  7. Doloboy

    Doloboy Peon

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    This should add it underneath every single post, are you sure you put it in the correct spot? Wordpress has a thing called "The Loop" in which is processes each post just by using that line of code. Try adding it in different places in the post area. I'll do a little research after I get home from work.
     
    Doloboy, Nov 16, 2009 IP
  8. Project Mobius

    Project Mobius Peon

    Messages:
    10,524
    Likes Received:
    170
    Best Answers:
    0
    Trophy Points:
    0
    #8
    write php logic to do it only between 2nd and 3rd post then
     
    Project Mobius, Nov 16, 2009 IP
  9. coolerchoice

    coolerchoice Active Member

    Messages:
    246
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #9
    just curious why you would want to do this,great if you want your blog to look the same with ads in the same places, personally random ads in posts or on pages seem to always work better and there are wordpress plugins for these, i use All in One Adsense and YPN plugin and my ctr and clicxks have doubled since i did you can specify colours, types of ad and even fixed or random ads, anyhow just my preferanc
     
    coolerchoice, Nov 16, 2009 IP