Adsense in Wordpress ?

Status
Not open for further replies.

trigatch4

BuildAndEarn
Aug 23, 2006
2,558
79
0
East Coast
www.eurekadiary.com
I'm trying to manually insert Adsense code into certain pages of my wordpress based site. I've copy/pasted the adsense code and indicated it was code to wordpress by wrapping it in <code> adsense code </code> but I don't see a damn thing. I've been playing around with it for awhile and absolutely nothing shows up.... anyone ever have this problem?
 


I used to be able to have adsense in straight code for wordpress, but for some reason i can't get it work in my last integration. It doesn't even work with the adsense deluxe plug-in (which you should look up to try)
 
I just got it to work (but it still has a bug).

Basically, when you go into code mode, you have to type <code> and then paste your adsense code in and then type </code>.... hit publish and it should be fine... look at it.

Now, if you go in to edit that page in any way... check out the code for the ads. It gets all jumbled up with no line seperation and sometimes it displays the <code></code> above the ad code and nothing at the end. So basically, every time you update your page you have to reintegrate the adsense code... effing annoying as hell. And to get it to work to begin with, you need to make sure it pastes nicely, as it appears when you copy it, with line seperation for each element.

I guess I'll just have to do this until I find a solution. Two things I'm going to try are:
  • Putting the ad code in a table
  • Making a php document that just houses the ad code and having the page retrieve the code from there everytime i want it inserted. but i have zero coding skills so that will be a long fix (as simple as it is, im sure)
Let me know if you find a fix!
 
You can still do that with that plugin. It lets you strategically place it anywhere in your template as well as embed it manually within posts should you feel the need...

It is really flexible and will save you a ton of time...
 
Dude, just create a text file containing the code and use an embed or input snippet to embed it into your post/site.
 
on another note if you are using the WP-Cache plugin (which is quite common) it is possible that your viewing your cached page and its not displaying the updated Adsense code. If you are using WP-Cache go into the options and delete the cache or try viewing in a different browser that hasn't cached the page yet.
 
I turned off the rich text editor. Thing was becoming more trouble than it was worth for a number of cases where I was trying to insert different code bits (not just adsense).
 
Status
Not open for further replies.