Home User profile
tagDiv Member
This user did not write anything. So we are just showing here some random text to make the profile page look nice :)
livelifehappy
tagDiv Member

I’m testing the theme here: http://roberttew.com

I’d like to loop the ads on the home page (see http://www.livelifehappy.com) and on all the other numbered pages under the 1st and 3rd post. How can I do this?

For my current theme – I’ve added this code to the index file:

index.php file under <?php /* Start the Loop */ ?>

line added: <?php $adcounter = 0; ?>

<?php while ( have_posts() ) : the_post(); ?>

<?php if ($adcounter == 1) : ?>

<div style=”text-align: center;”>
<script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<!– 300×250 Home Page Below 1st Post –>
<ins class=”adsbygoogle”
style=”display:inline-block;width:300px;height:250px”
data-ad-client=”ca-pub-xxxxxxxx”
data-ad-slot=”8474826612″></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></div>

Viewing 1 post (of 1 total)