I want to put in and ad code after every 6 post on my blog. I cant really figure out how to break out of the foreach and insert the ad code.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This link will help you. Third title says: Insert Ads After The First Post
Change the code for 6 where it says 2:
UPDATE: As Gordon noticed, you asked for code every 6 posts (sorry I missed that on my first read). So the code should be: