Adsense after every 3 blog posts on ethos

Hello there, I have an adsense code that adds an advert after every displayed blog post, however, I would like the ad to be displayed after every 3 blog posts recursively so they are displayed after the 3rd 6th 9th and so on, how would i achieve this within the function?

here is the existing code I use:

function add_my_ads() {
if(is_home()){
?>

<?php }}

add_action( ‘x_after_view_ethos_content’, ‘add_my_ads’, 10 );

Hey There,

Thanks for posting in!

That is technically possible. However, that would fall beyond the scope of our support since it would require custom development. You need to contact to a 3rd party developer to help you with this.

Thank you for understanding.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.