Currently this code http://pastebin.com/As0exwZy is displaying 10 posts because I set it in the Reading settings. Now what I want is to display a advertisement(widgetize) every 3 posts... how can I do that?
$i = 0;
// Output the post
// Output an ad after each third post
if ($i % 3 === 0)
The % is called the modulus operator.
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
3 years ago