I’d like to insert Google DFP ads every fourth post on my homepage. I’m using the following code to do so:
<?php
if(($row_count % 4) == 0){?>
<div class='row dd-feed-ad'>
<div class='col-md-12' id='div-gpt-ad-xxx-0' style='width:480px; height:60px;'>
<script type='text/javascript'>
googletag.cmd.push(function() { googletag.display('div-gpt-ad-xxx-0'); });
</script>
</div>
</div>
But that means that one specific ad would repeat. Does anyone know how I could set it up so there is different content after post 4, post 8, post 12, etc?