• Hello everyone

    I tried inserting the AdSense code in a post of my wordpress blog, and for some reason the ads do not get displayed. I put the adsense code in the HTML window that you can use when creating new posts. Is it possible that WordPress is somewhat modifying my adsense code such that it doesn’t load?

    Thank you

Viewing 11 replies - 1 through 11 (of 11 total)
  • Yea it could.
    Use the basic editor only and go to:
    admin -> Options -> Writing
    uncheck the box for “WordPress should correct invalidly nested XHTML automatically”.

    Thread Starter jack79

    (@jack79)

    Ok, I just noticed that instead of

    <script type=”text/javascript”
    src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”&gt;
    </script>

    I have the folowing that gets generated by WordPress

    <script type=”text/javascript”>
    </script>

    I guess the program removes the src=”” part of the code inside the post. Does anyone have a suggestion on how to fix this?

    Thread Starter jack79

    (@jack79)

    Thanks for the reply. The “WordPress should correct invalidly nested XHTML automatically” option was unchecked, and I also unchecked “Users should use the visual rich editor by default” but for some reason I still see the rich text editor when I post messages. Still, the problem is there. Any other ideas.

    I’m having this issue as well. Pretty frustrating. I also added AdSense Deluxe to try and solve the issue, but no dice.

    Thread Starter jack79

    (@jack79)

    Ok, when I go directly in the DB with phpMyAdmin I can add the adsense code inside a specif post text.

    However, now, at the end of every line of the AdSense code, a is added, which breaks the code.

    Anyone knows how to deactivate the automatic adding of at the end of lines in WordPress?

    Still, there is got to be beter ways than going straight in the DB tables.

    Thanks

    Can you elaborate on what you did? And my AdSenseDeluxe “code” <!-adsense-> gets turned into <!–dsens–> upon saving. BTW, I’m running WP 2.0.4, IE6, Windows XP

    I found this thread as well. I’m still having the same issue (no AdSense ads), but It did solve my editing issue (<!-adsense-> to <!–dsens–>).

    http://wordpress.org/support/topic/71784?replies=19

    Thread Starter jack79

    (@jack79)

    I went straight to the DB tables of WordPress on my web server. If you go to table “wp_posts”, you will see a field “post_content”. You can edit the content of this field and put your adsense code directly in there. However, when the blog post gets generated, a < br > [br] tag gets added at the end of every line, breaking the adsense code (it shouldn’t have these tags in there)

    Wow. That’s the hard way!

    Why not just add the adsense code to your theme’s files so you don’t have to be copy/pasting or database editing all the time?

    Or use a plugin that does that for you automagically?

    This tutorial may be of use: http://www.tamba2.org.uk/wordpress/adsense/

    Thanks for the link, but that doesn’t help.

    Well, I got mine to work. What I did was simply go back to AdSense, generated a new ad code, and pasted that into the AdSense Deluxe plug-in. Even if you don’t use that plug-in, I would imagine this procedue might help. What happened to me is that I deleted extra spaces in the code and justified the lines to look even. Don’t do that. Paste the code as is, and save it. I hope this helps.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘AdSense and WordPress’ is closed to new replies.