Title: ADS AFTER X POSTS
Last modified: September 1, 2016

---

# ADS AFTER X POSTS

 *  Resolved [etay1986](https://wordpress.org/support/users/etay1986/)
 * (@etay1986)
 * [10 years ago](https://wordpress.org/support/topic/ads-after-x-posts/)
 * i would like to put ads after 10 posts.
    the code:
 * <?php $counter =0; ?>
    <?php if ( have_posts() ) : ?> <?php while ( have_posts()):
   the_post(); $count++; ?> <div id=”post-<?php the_ID(); ?>” <?php post_class();?
   >> <?php the_title(); ?> <?php the_excerpt(); ?> </div> <?php $postnum++; if(
   $postnum == 10) { ?> <div>AD CODE HERE</div> <?php } ?> <?php endwhile; ?> <?
   php wp_pagination(); ?> <?php else : ?> <?php get_template_part( ‘no-results’,‘
   index’ ); ?> <?php endif; ?>
 * **it dosent work…can someone halp me please? 🙂**
 * [https://wordpress.org/plugins/peepso-core/](https://wordpress.org/plugins/peepso-core/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [PeepSo, Inc.](https://wordpress.org/support/users/peepso/)
 * (@peepso)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/ads-after-x-posts/#post-7475158)
 * Hi,
 * Sorry but the scope of our support doesn’t really cover custom modifications,
   I’d advise contacting a 3rd party dev about this. Preferably to be done in a 
   form of a plugin – if possible, that way if there are no changes to the core,
   you won’t have to apply the hacks after each upgrade.
 * _[signature removed]_

Viewing 1 replies (of 1 total)

The topic ‘ADS AFTER X POSTS’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/peepso-core_e0dcd7.svg)
 * [Community by PeepSo - Download from PeepSo.com](https://wordpress.org/plugins/peepso-core/)
 * [Support Threads](https://wordpress.org/support/plugin/peepso-core/)
 * [Active Topics](https://wordpress.org/support/plugin/peepso-core/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/peepso-core/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/peepso-core/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [PeepSo, Inc.](https://wordpress.org/support/users/peepso/)
 * Last activity: [9 years, 11 months ago](https://wordpress.org/support/topic/ads-after-x-posts/#post-7475158)
 * Status: resolved