WordPress function to post ad after CSS

66 Views Asked by At

I have a WordPress website which has a page that shows the latest posts.Each post on the page is contained in the CSS class ".g1-collection-item".

I would like to have a function that places an adsense ad after every 5 times the class class is loaded.

Is there a function I could use to load data after every x amount of times a css class is rendered? Maybe a plugin could work. I tried WP-Quads but seem to have trouble placing the ad after x amount of featured posts.

Any sense of direction is greatly appreciated.

0

There are 0 best solutions below