Adsense units in between posts 1 2 and 2 3

  • Unknown's avatar

    Hi guys,

    I need some helping putting adsense units in between posts 1+2 AND 2+3.

    To put it in between posts 1+2 what i’ve done is edit the main index template with this:

    ?php $count = 0 ?

    then the if have posts, show posts business.

    ?php if ( $count == 0 ) : ?

    ADSENSE/advertiser code

    ?php endif // $count == 0?
    ?php $count++ ?

    ?php endwhile; else: ?

    This will put it in between posts 1+2 and changing ?php if ( $count == 0 ) : ? to
    ?php if ( $count == 1 ) : ? will make it appear between posts 2+3

    But if you try and run both at the same time, they will both appear together (e.g two units between 1+2 or two units between 2+3). Is it possible to get it to appear between 1+2 and 2+3?? Any help would be great.

  • Unknown's avatar

    Hi there, sounds like you’re in the wrong forum; if you’re weblog isn’t hosted here at WordPress.com you need to be asking the guys over at WordPress.org.

  • The topic ‘Adsense units in between posts 1 2 and 2 3’ is closed to new replies.