Support » Requests and Feedback » Code Bug when I enter Google AdSenes onto page

  • Resolved KosherShopaholic

    (@koshershopaholic)


    When I enter the code to run a google ad into HTML I get this garbage showing up in my home screen, '// // // ]]>'

    How do I get rid of it????
    Is there a plug-in for Google Ads to run before content. I have a widget to run google Ads after content.
    I am using StudioPress News Theme

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    You don’t need a plugin. I’m assuming you’re putting the google code in a text widget?

    Yes, I’m putting it in a text widget but it there’s a problem – it places garbage symbols in my post on the home page. See my website to see what’s happening:
    http://www.koshershopaholic.com
    How do I get rid of that?????

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    This is a widget or are you putting the code manually into your posts?

    I’m putting it manually into the post under HTML mode.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    Okay, then the problem is that the code is being picked up by the excerpt grabbing 🙂

    if you create custom excerpts, those would be used instead and would obviate the issue. If that’s not doable, then you should edit your theme to have the ads in your single.php file, outside of the content of your post.

    Okay, so how do I do that? single.php file? Thank you.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    You edit the file in your theme, single.php, and put the ad where you want it to show up.

    That answer was a bit too technical for me but I fixed it by putting the code in a simple hook. Thanks for your support and help, though.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Code Bug when I enter Google AdSenes onto page’ is closed to new replies.