How to include Google Adsense ads in a list of WordPress posts
This is a simple WordPress page template for showing a list of post titles in a specific category, with a Google ad after a certain number of posts. Add your Google Adsense script in the div with class custom-adsense. Name this file page-GoogleAds.php (or page-WhateverYouWantHere.php), save it in the same folder in your WordPress theme directory where your page.php file lives, and a new template called “List of Posts with Google Ads” will be available when you create new pages in WordPress.
View or download the code on GitHub here.