View Full Version : Evolution and Google Ads
athlon24
10-27-2008, 11:07 AM
I tried to put a google ads just after the title of the post in my single post file but i think it crashes the page and showed a white blank page. at first, the page will load but it does not finish and went on blank. :(
Any reason why?
Kevin
10-27-2008, 11:18 AM
Hi Athlon
This appears to be an issue with Firefox. The page is displaying ok for me in IE.
The source on FF gives this code :
<script> window.google_render_ad(); </script>
I think this may be an error with jquery.
athlon24
10-27-2008, 11:26 AM
Funny because when I move it above the title, it is ok. But when it is below the title, it's not. Do you have any idea, how to solve this one?
sarahG
10-27-2008, 01:10 PM
It's not jQuery, it's the theme.js file which is being used to insert invalid code.
This line in theme.js
$(".post").wrap("<div class='post_c'><div class='post_b'>" + "</div></div>");
is the cause of the problem for this particular issue. I can't explain why, but the AdSense ads don't seem to like the theme.js changes.
You could remove the line above from theme.js (or comment out with two forward slashes ie. // ) and see what happens. The AdSense should be fine, although I don't know what changes it will make to the look of the page, however the addition above can easily be done by hand and shouldn't require JavaScript to do it.
athlon24
10-27-2008, 01:21 PM
It happened that adsense doesn't conflict if you put the the code above the post title, so as of now I'm sticking to it. I will try to put something inside the post, and will update you later.
sarahG
10-27-2008, 02:01 PM
It happened that adsense doesn't conflict if you put the the code above the post title
Yes, that's because the theme.js file isn't changing anything above the post title, it's targeting the post div which is where you're placing the adsense when you place it after the title hence my reply above ;)
AravindJose
11-18-2008, 04:44 PM
I've installed it on my blog and tweaked a bit.
It works great, in fact, awesome.
Kevin
11-18-2008, 05:36 PM
I've installed it on my blog and tweaked a bit.
It works great, in fact, awesome.
Glad you like it :)
athlon24
11-18-2008, 05:48 PM
@aravindjose
What did you install? Did that solve the adsense inside the posts?
sarahG
11-18-2008, 08:54 PM
Did that solve the adsense inside the posts?
If you make the changes already suggested then you can put adsense inside the posts. Nothing else is going to fix it.
athlon24
11-19-2008, 02:11 AM
haven't tried it yet because it seems it worked putting it above the title post. I am going to set it now. thanks
-------------------------------
It didn't work for me... :(
sarahG
11-19-2008, 08:51 AM
Where did you put the adsense code and what other code did you change? Unfortunately we're having to second guess you here.
Post up the surrounding code of where you placed your adsense code, and let us know the filename, and also your theme.js file.
However, I've just tried this on my local copy of the theme and inserted adsense in right before the_content() tag on the single.php file and it works fine in Firefox.
athlon24
11-19-2008, 02:18 PM
@sarahG
i tried to put the code, before the the_content() tag... and taken out the line that you said but it is still the same. It will first load then all will become blank... I can give you a temporary admin account like before if its ok to you..
sarahG
11-19-2008, 04:21 PM
Yeah sure, no problem. Although I'm offline shortly for the evening but I can look at it possibly later tonight or early morning.
athlon24
11-20-2008, 02:43 AM
already sent you the temp admin account. the line in the theme.js is already removed. You can use the ads in the top of the post title and you can just put it below the post details. Thanks.
sarahG
11-20-2008, 09:43 AM
Athlon, all I've done is move the Google Ads script to right above the_content() in your single.php file and it works fine?
http://thatwashot.com/archives/2008/11/15/the-whole-sphere-not-just-the-blogosphere/
So I don't know what you tried that didn't work. You'll need to give me more info as I can't fix something that's working :)
athlon24
11-20-2008, 11:59 AM
i don't really get it. I did exactly that but when i checked it, after it loads, it becomes white blank. but now, it's all working.. what did you do?
sarahG
11-20-2008, 12:57 PM
I moved your adsense code from where it was to where it is now.
Maybe you were loading a cached version of theme.js or something? I didn't do anything else, just moved the code.
Guess I have the magic touch :p
athlon24
11-20-2008, 02:42 PM
hmmm, maybe it's cache again. like before... Thanks a lot for this... maybe you really have magic touch in my blog... :D
vBulletin® v3.8.3, Copyright ©2000-2012, Jelsoft Enterprises Ltd.