Title: Ads Between Posts
Last modified: August 19, 2016

---

# Ads Between Posts

 *  [aesamattki](https://wordpress.org/support/users/aesamattki/)
 * (@aesamattki)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/ads-between-posts/)
 * I want to put ads under my posts but I’m not allowed more than 3 per page. How
   can I set up the site to display only 3 ads under the posts on the main index
   page? Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [aesamattki](https://wordpress.org/support/users/aesamattki/)
 * (@aesamattki)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/ads-between-posts/#post-1052264)
 * I read [this](http://www.lancelhoff.com/adding-adsense-ads-between-posts/) article
   when trying to find out how and it would work great if there is a way I can specify
   in <?php if ($count == 1) : ?> to do posts 1, 3, AND 5 instead of just 1. I tried
   putting in <?php if ($count == 1,3,5) : ?> but it came up with an error.
 *  Thread Starter [aesamattki](https://wordpress.org/support/users/aesamattki/)
 * (@aesamattki)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/ads-between-posts/#post-1052278)
 * I was kinda hoping I could get some help on a one or two of my topics. This one
   doesn’t really seem too complex to me. Can someone please find it in their hearts
   to post a response?
 *  [evilbeet](https://wordpress.org/support/users/evilbeet/)
 * (@evilbeet)
 * [17 years ago](https://wordpress.org/support/topic/ads-between-posts/#post-1052772)
 * You need to use a Boolean OR.
 * I’m thinking if you did <?php if ($count == 1 || 3 || 5) : ?> it would work, 
   but I’m not 100% sure how Boolean logic works in PHP.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Ads Between Posts’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [evilbeet](https://wordpress.org/support/users/evilbeet/)
 * Last activity: [17 years ago](https://wordpress.org/support/topic/ads-between-posts/#post-1052772)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
