I'd like to use $postcount to display google ads in-between posts in 2-3 different places of a WordPress site.
I've experimented with this code snippet, and it works great for 1 ad display in-between posts:
<?php
$postcount++;
if($postcount==2){?>
But if I want to display 3 sets of ads, then how do you put multiple numbers in the $postcount? I tried several coding methods that were rejected, including:
<?php
$postcount++;
if($postcount==( array( 2,4 ) ) ){?>
Do you have a suggestion? Thanks!