Adding Adsense Code


  • Member
    meetgerry
    July 22, 2017 at 2:22 pm #31763

    I wanted to add adsense Ads between every 3 blog grids using your Post Grid element in Visual Composer. Which file and after what code should I place the adsense code? See the screenshot below: http://i.imgur.com/5GgP7Qa.jpg

    I was given the following code to be placed in the index.php file of the theme, but that is only showing on the blog page selected in the Settings>Reading and not between the grids.

    ======================================
    <div class=”westarticle”>
    <?php $postnum++; if($postnum%2 == 0) { ?>
    <script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
    <!– New landing 2 –>
    <ins class=”adsbygoogle”
    style=”display:inline-block;width:325px;height:405px”
    data-ad-client=”ca-pub-1829550496124713″
    data-ad-slot=”3068513484″></ins>
    <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
    </script>
    <?php } ?>
    </div>
    ======================================

    Please help, its urgent!

    Sorry, this forum is for verified users only. Please Login or Register to continue

Comments are closed.