Hi All, I recently download a free wordpress theme http://newwpthemes.com/wordpress-theme/just-news/ Problem is, when i am trying to put adsense code in functions.php the code gets totally messed up and showing errors. Can anyone suggest me how can i solve this problem?? Thanks Alana
Why are you trying to put adsense in functions.php? Thats if you want to enable a theme options page (and you have to have knowledge of how to code it). I reccoment inserting the ad code within idex.php, sidebar.php or single.php. Other than that, there are tons of nifty adsense plugins that you can use. I recommend using a plugin.
Thanks for your reply Designstrike I want to use 468x60 header banner and 125x125 banners for adsense. If i install adsense plugin then how can i place adsense code there?
You definately dont place adsense code in functions.php, you should be placing it in index.php or sidebar.php or something like that, if you're using a plugin for adsense then there should be somewhere that it explains where you place the code for it to appear where you want.
If you want to place banner on top of your site try to find file header.php and add the code there. I have also checked with the developer of this theme there is someone else complaining about the same problem. A new version is uploaded try to download again and make the changes in header.php file
For most plugins you have automated options for creating and managing your adsense ads. And you upload the ads to your webpage trough widges (for most cases). Be shure to have the pub-id code, almost all of them need it.
Don't edit functions.php, there is nothing to do with functions.php to place adsense ads You can install the plugin "adsense manager" and add the code "<?php adsensem_ad('YOURADNAME'); ?>" whereever you want so, if you want ad show in header, edit header.php if you want ads (ex: 125x125) in sidebar, edit sidebar.php and so on Hope this helps you.