I have Wordpress website and I want to implement Adsense ads into it.
I have 30 posts per page so i want to show ads after every 7 posts, how can I do this? Currently I am using this method for 3 ads in 10 posts, and after 10 posts no ads showing:
<center><?php if( $wp_query->current_post == 1 ) : ?>
Adsense Code Here
<?php elseif( $wp_query->current_post == 3 ) : ?>
Adsense Code Here
<?php elseif( $wp_query->current_post == 7 ) : ?>
Adsense Code Here
<?php endif; ?></center>
I want to show ads after every 7 posts, is that possible in one code line ?