Google in-Feed Ads

  • #121675



    ist there a way to place the Google in-Feed-Ads into the article feed on the start page or into the archive/category/tag-/etc-Feeds?


    There is currently no easy feature to do that from the dashboard or with a simple code.

    But it is possible to place ads like that with PHP by editing the theme files.
    Depending on the theme this goes in archive.php and may look something like this –
    This’ll show an advert every 3rd post.

    Before the loop:
    <?php $location = 0; ?>

    Inside the loop where the advert should show:

    <?php if($location == 3) { 
    echo adrotate_group(2); 
    $location = 0 
    } else {
    } ?>

    Of-course change the 3 to something you like/need. And change the group ID (2) to the group you need.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

You may be interested in