View Full Version : need help with Evolution Theme
venkat
06-03-2008, 10:02 AM
Hey the new Evolution theme is really great !! Iam using it in my blog.
Can you help me insert Adsense code into it, when I insert the adsense code before this <?php the_content(); ?> in single.php
The pages loads and gets redirected to a blank page??
Can we use plugins like adsense manager and shylock adsense with evolution.
--Thanks
Kevin
06-03-2008, 12:06 PM
I havent used those plugins myself so Im not sure what code they need in place to work but I dont forsee any problem with it
Are you trying to put the adsense ads before the content?
venkat
06-03-2008, 12:38 PM
yes kevin iam trying to put it before the content.Iam presently not using the plugins i mentioned rather trying to put the adsense code directly.
can you please guide on how to insert the adsense code before the content in the single.php
Another thing I noticed is that iam facing this problem only with Firefox, I've it on IE 7 and it works fine.
--Thanks
Kevin
06-03-2008, 06:15 PM
let me know if this article helps you
How to integrate google adsense with your Wordpress Blog without using plugins (http://www.bloggingtips.com/2007/05/10/how-to-integrate-google-adsense-with-your-wordpress-blog-without-using-plugins/)
(http://www.bloggingtips.com/forums/../2007/05/10/how-to-integrate-google-adsense-with-your-wordpress-blog-without-using-plugins/)
venkat
06-03-2008, 06:48 PM
kevin, i did try as given in the post you mentioned. It is actually working well with IE7, and Opera but not with FireFox 2.0.0.14
I'am using it at http://www.techyard.net
The problem occurs only with the single.php ie., the post pages and not else where.
Even tested it with browsershots.org It shows the problem even there.
I've uploaded the screenshot here
http://www.techyard.net/browsershot--.jpg
hope this gives an idea why it is not working.
--thankyou
Dartz
06-03-2008, 08:03 PM
I'm looking at it right now, and it works perfectly fine on my Firefox, and we're both using the same version. I'm not getting redirected or anything, and nothing happens when I enable my adblocker.
I honestly have no idea, but it seems to work perfectly on mine. What OS you using?
sarahG
06-03-2008, 08:18 PM
I think the problem is AdSense clashing with JQuery (although every where I look it seems to say it was fixed at v1.0). Try upgrading your version of JQuery as you're on 1.2.3 and 1.2.6 is out now. However it only crops up with video ads and/or 3 ads on the page from what I can see. Try disabling video adsense or just check that it's fine with just 2 ads (videos or text) on the page.
Kevin
06-03-2008, 10:25 PM
yeah im getting the same problem on firefox. As Sarah says, it appears to be a problem with Video. I wasn't aware of any conflicts with video ads.
Sarah - have you come across this before?
sarahG
06-04-2008, 09:04 AM
No, but then again I don't use the video ads or jquery. I've never seen it before, however it's happening in FF3 too so it's clearly not a fixed issue. I did a quick search and saw people mentioning jquery and adsense not playing well together as I mentioned, but that was about all.
The latest version of jquery is 1.2.6 which may fix the issue, or the beta of 1.5 could do too. It may be a good idea to report it to the developers as well.
vwvr9
08-11-2008, 07:47 PM
Guys, has this been fixed?
Kevin
08-11-2008, 08:28 PM
Hi VW,
I dont use video ads but the latest jquery file might solve this. I've updated the official download with 1.2.6
Try it out. Heres what you need to do
1. Download 1.2.6 from here (http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.2.6.pack.js)
2. upload it to the JS folder of the evolution theme
3. Go to your header.php template and change the reference from 'js/jquery-1.2.3.pack.js' to 'js/jquery-1.2.6.pack.js'
Let me know how you get on :)
Kevin
vwvr9
08-12-2008, 01:57 AM
Kevin, I did the update but it did not work. As a workaround i disabled the jquery load line in the header file and everything works fine now.
So it does look like a jquery issue but 1.2.6 did not fix it.
What will fail if I i comment out the jquery load line in the header file?
Also, do you need me to setup a test site for you to traoubleshoot the issue? I'll be glad to do so.
vwvr9
08-12-2008, 02:09 AM
<script type="text/javascript">ShowTab(0);</script>
This line seems to be the cause
Kevin
08-12-2008, 02:09 PM
yeah the domtabs use the jquery
if you're not too concerned about the multi tab box then you can remove the jquery without any problems. Personally, I'd just stop serving video ads :)
vwvr9
08-12-2008, 02:43 PM
Key Kevin,
My workaround was to comment out.
<!-- <script src="<?php bloginfo('template_url'); ?>/js/jquery-1.2.6.pack.js" type="text/javascript"></script> -->
My jscript is crap, can you advice me on the impact of commenting that line out please?
Currently with that line gone my ads are loading fine and so are the tabs. But in IE there is seems to be a jscript error reported but the site load anyways.
Looking forward to your advice.
vwvr9
08-14-2008, 06:03 AM
no update anyone?
sarahG
08-14-2008, 12:42 PM
HTML comments may or may not stop the jQuery from loading but by the sounds of it they aren't. Try removing the whole line and then see what happens. Your tabs will most likely stop working.
Without seeing your site there's not much more to offer in terms of help.
Kevin
08-14-2008, 01:37 PM
yes can you please post the url to your site so that we can have a look at it
vwvr9
08-14-2008, 03:36 PM
Sorry guys, should have been the first thing i did.
Here you go. http://thedaneshproject.com
I can get you access if you need it too.
Thanks again, appreciate your help
Kevin
08-14-2008, 06:18 PM
it seems to be working ok. I'm actually surprised it's working without it.
sarahG
08-14-2008, 08:24 PM
Kevin, looking at the domtabs code, it doesn't use jQuery, it's using the DOM directly. The file that uses jQuery is theme.js, but to be honest I'm not overly sure what the file is there to achieve as it just seems to be adding in a few HTML tags.
vwvr9
08-15-2008, 01:34 AM
What happened when I removed the script line was that the widgets lost their white backgrounds. I have to play around with the CSS file to get the background back in. Besides that I have not seen anything else break.
But my firebug keeps flagging and IR says there jscript error :D
sarahG
08-15-2008, 08:46 AM
It will do because the file theme.js has jQuery code in it. As you've stopped jQuery from loading you need to remove this script call too.
However looking at your code you have.
The items in the theme.js file seem to do the following
Wrap
<div class='post_c'><div class='post_b'>...</div></div>
Around any content contained by a .post class
Wrap
<div class='widget_c'>...</div>
Around all content contained in the .widget class
Add
<div class='widget_b'></div>
To all content in a .widget class after the content
Add
<h2 style='text-align: left;'>Search</h2>
Before the item with and id of search
Also it inserts span tags into linked menu items.
So if you add those in manually then you won't need the jQuery anyway.
And a note for anyone who reads this and does want jQuery, it's now shipped with WordPress so you can call that one from under wp-includes/javascript (I know it's with WP 2.6, possibly 2.5 too).
vwvr9
08-15-2008, 09:57 AM
Sarah,
Thank yo so much for the info. This is really helpful.
I will try to use the WP jquery and see what happens. Curious to find out now ;)
If it does not work then I'll revert to CSS-ing them.
sarahG
08-15-2008, 04:02 PM
I'm guessing it may still clash, however you will need to change the theme.js file to use jQuery(document) instead of $(document) as the no conflict setting will be in force due to the other frameworks also available.
Dannymh
09-23-2008, 06:12 AM
I have this same issue. Instead of making changes to the them, is there a way to inject the adsense code into the the_content() tag?
sarahG
09-23-2008, 08:25 AM
There's the adsense deluxe plugin that allows you to define adsense blocks and just add the comment it gives you into your post. I've used it once in the past, it does what you need.
Dannymh
09-23-2008, 11:33 PM
I tried adding it into the content block but it still reloads, so the jQuery conflict is still there, it is with FF3.
I have just chosen to work around it at the moment and have placed the Adsense code elsewhere on the site (http://www.phpCoder.org) I will keep at it and maybe adapt it further later, because having it inside posts is extremely valuable clickthrough wise
vBulletin® v3.8.3, Copyright ©2000-2012, Jelsoft Enterprises Ltd.