WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin WP-Table Reloaded] Adsense ads not showing in table. (6 posts)

  1. justinw
    Member
    Posted 4 years ago #

    This plugin in is awesome. Exactly what I've been looking for.

    Just one problem. I'm trying to insert some adsense code in one of the cells, but the ad never shows up. The exact same code works elsewhere on my site.

    Should adsense code work? Or am I doing something dumb?

    Here is my code

    '<script type="text/javascript"><!--
    google_ad_client = "pub-16277542592538255";
    /* PCPP Under Header Link Bait */
    google_ad_slot = "0641746470";
    google_ad_width = 728;
    google_ad_height = 15;
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>'

    And here is my site http://www.printercostperpage.com. You can see the empty row in the table where the ad should appear but doesn't.

    Thanks for your help and thanks for this great plugin.

    -Justin

  2. TobiasBg
    Member
    Posted 4 years ago #

    Hi,

    try pasting in the code without any manual line breaks, i.e. all in one line, except for the automatic line breaks that are added due to the size of the text field.

    Like this:

    <script type="text/javascript"><!-- google_ad_client = "pub-16277542592538255"; /* PCPP Under Header Link Bait */ google_ad_slot = "0641746470"; google_ad_width = 728; google_ad_height = 15; //--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>

    Best wishes,
    Tobias

  3. justinw
    Member
    Posted 4 years ago #

    Tobias,

    Thanks so much for your quick response. I tried the code without any line breaks and still get the same issue.

    The same code works above the table. And other text works inside the cell. There just seems to be something about Google's code snippet that it doesn't like.

    I wish I knew some Java so I could try to troubleshoot. Any other ideas?

    Thanks.
    -Justin

  4. TobiasBg
    Member
    Posted 4 years ago #

    Hi,

    now that is weird...
    Honestly I don't really know why it is not working...
    It could one of the following:
    - There is still a manual line break after the code in the cell.
    - Maybe you can't have the same Google Ads code in a page twice?
    - Try just putting the second script tag inside the cell, while the first one (with all the variable definitions) remains outside of the table.

    Best wishes,
    Tobias

  5. justinw
    Member
    Posted 4 years ago #

    Tobias,

    Bravo, your third solution solved the problem. I placed the first half of the code above the table and the second half inside the cell without any line breaks.

    Thank you so much for your help.

    -Justin

  6. TobiasBg
    Member
    Posted 4 years ago #

    Hi,

    very cool! :-) You are welcome!

    Best wishes,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Topic