1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Adsense Between Posts in WordPress

Discussion in 'WordPress' started by waxingpoetic, Feb 18, 2008.

  1. #1
    I'm sure this has been covered several times....don't shoot me! I've been searching the forums for the last hour to no avail, and I've tried 2 plug-ins.

    How can I get Adsense between the first 3 posts on my blog in WP? I would like it set up the same way I have it at Blogger for the second blog in my sig.

    Thanks in advance.
     
    waxingpoetic, Feb 18, 2008 IP
  2. Bolkie

    Bolkie Peon

    Messages:
    144
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Bolkie, Feb 18, 2008 IP
    waxingpoetic likes this.
  3. primeryder

    primeryder Well-Known Member

    Messages:
    1,658
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    158
    #3
    If i recall correctly, I was able to do that by going into wp/content, wp/themes and then editing index.php
    hope that helps
     
    primeryder, Feb 18, 2008 IP
  4. waxingpoetic

    waxingpoetic Well-Known Member

    Messages:
    886
    Likes Received:
    42
    Best Answers:
    0
    Trophy Points:
    140
    #4
    Thanks! Rep + That one's closer than the other two I tried. Almost there...

    The problem is that it puts the Adsense at a random position in the middle of my posts. Not quite what I was going for...so I attempted to edit the index.php per the download page for the plug in...to no avail.

    Oh well, at least there are ads on there. Any other insight anyone?

    That's perfect...if you know what you are doing...which I barely do. I tried to edit the file, but I still get Adsense in the middle of my post as opposed to between them. I put <!-startadsense-> after the <ul> for comments before the </div> tag...am I anywhere in the ballpark? Thanks for your response.
     
    waxingpoetic, Feb 18, 2008 IP
  5. xxMirceaxx

    xxMirceaxx Well-Known Member

    Messages:
    917
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    135
  6. waxingpoetic

    waxingpoetic Well-Known Member

    Messages:
    886
    Likes Received:
    42
    Best Answers:
    0
    Trophy Points:
    140
    #6
    Thanks. I found that one on Google...I read it a couple times, but the thing about it is, it sounds like I have to paste in my own ad code, and I don't really want to do that, but I will read this again later today and maybe try it out. Thanks for your response. Rep +
     
    waxingpoetic, Feb 18, 2008 IP
  7. xxMirceaxx

    xxMirceaxx Well-Known Member

    Messages:
    917
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    135
    #7
    I think i'm missing something ... why don't you want to paste the adsense code? you have to do that with every site for adsense to display from what i heard! :)
     
    xxMirceaxx, Feb 18, 2008 IP
  8. mcfox

    mcfox Wind Maker

    Messages:
    7,526
    Likes Received:
    716
    Best Answers:
    0
    Trophy Points:
    360
    #8
    mcfox, Feb 18, 2008 IP
  9. waxingpoetic

    waxingpoetic Well-Known Member

    Messages:
    886
    Likes Received:
    42
    Best Answers:
    0
    Trophy Points:
    140
    #9
    I'm sorry...to clarify...the other plug-ins I have tried only required my pub ID and an optional channel number. I didn't necessarily want to have to create my own ads and generate code if their is a plug-in that does it for me. I'm fresh from the point and click ease of using Blogger, so I'm spoiled, and I know there's bound to be an easier way, but maybe not. *shrug* Thanks for your help.

    Thanks for the response...rep +. I tried that one and Adsense Deluxe.

    But hey, if at first you don't succeed...try some more!!!
     
    waxingpoetic, Feb 18, 2008 IP
  10. Proness

    Proness Active Member

    Messages:
    337
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    70
    #10
    The closest I could get is this: http://www.chait.net/index.php?p=310 - Download the CG inBetween plugin from that page.

    As a matter of co-incidence, I have been searching for the same thing you are since yesterday.

    Regarding the above plugin, it gets kinda buggy when you insert inverted commas(") in the function. It works well for inserting normal adsense blocks & banners, but doesn't work if you try to make boxes like the one's on Coolest-Gadgets.com.

    If you find a better plugin, please revert back to me.

    Thanks.
     
    Proness, Feb 19, 2008 IP
  11. dct

    dct Finder of cool gadgets

    Messages:
    3,132
    Likes Received:
    328
    Best Answers:
    0
    Trophy Points:
    230
    #11
    The way I did it on Coolest-Gadgets.com is by editing index.php in the theme (as somebody else said).

    The code is something like:
    
    	<?php if (have_posts()) : 
    		$lMaxAdsToDisplay = 2; 
    		$lPostNo = 0;
    
    		while (have_posts()) : the_post(); 
    			$lPostNo++;
    			?>
    // This is where you post is displayed
    
    PHP:
    and then at the end of the loop show your ad:
    
    if((($lPostNo + 1) % 2) == 0)
    {
    	if ($lNotLoggedIn && $lAdsDisplayed < $lMaxAdsToDisplay) 
    	{
    		$lAdsDisplayed++;
    	?>
    	<br />
    	<div class="contentboxred" style="height:255px ">
    <div class="topboxadvert">
    	<p>
    // Google code
    </p>
    
    ?>
    <?php endwhile; ?>
    
    PHP:
    You need a bit of coding experience but it's not too hard
     
    dct, Feb 26, 2008 IP
    waxingpoetic likes this.
  12. Proness

    Proness Active Member

    Messages:
    337
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    70
    #12
    Yeah, got it. Used the inBetween Plugin and was able to make those blocks like on your site.

    I already had those codes from the source of your site - somehow, couldn't get it right then.

    Thanks a lot - Amazing site you have there.

    Regards,

    Bhavik.
     
    Proness, Feb 27, 2008 IP