Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Add ad code into activity stream

@henrywright

Moderator

@bhekzin actually, instead of adding the ad as an activity item, you could just modify the activity loop to insert the ad dynamically on every 8th item. This is how you’d do that using a for loop:

for ( $i = 1; $i < 1000; $i++ ) {
    if ( $i % 8 == 0 ) {
       // this is the 8th item so insert your ad code
    }  
}
Skip to toolbar