• When I add a google AdSense Ad to the sidebar-2.php, it works fine on all posts except it does not show up on the front page.

    I am currently inserting the following into sidebar-2.php:

    <script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
    <!– 200x200Square –>
    <center>
    <ins class=”adsbygoogle”
    style=”display:inline-block;width:200px;height:200px”
    data-ad-client=”ca-pub-2016667189184986″
    data-ad-slot=”3281349754″></ins>
    </center>
    <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
    </script>

    Also, I am trying to use a sidebar-2.php in a child theme so it does not get overwritten when I update the theme, but that does not work either. I can only get an ad to show up if I insert the previous code into the main theme.

  • The topic ‘AdSense not showing on Sidebar 2’ is closed to new replies.