Link to home
Create AccountLog in
Avatar of raulmonda
raulmonda

asked on

Code Integration in WordPress Theme

Hi experts,

Here is the scenario: I want to integrate Google AdSence script in my blog. I use the theme attached. I need Google Ads to be shown in sidebar. I use the widget "Text" and i type in the following code
<!DOCTYPE html>
<html>
<body>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-XXXXXXXXXXXXXXXXX";
/* Add by Google */
google_ad_slot = "YYYYYYYYYYYY";
google_ad_width = 250;
google_ad_height =250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</body>
</html>

Open in new window


Now, according to Google, until i have my site reviewed and approved, I will get "blank, solid color ads". But i get nothing. The code i use allocates the required space on the page but the background is my sidebar background. At least the Ad border should be there.
What i have done wrong? Or is there any other solution to integrate the Ads in the sidebar? Ive tried to identify a possible place among theme php files, but i get lost, as im not good in php.

Any help in this matter will be highly appreciated.

Regards,
Raul M.
theme.zip
SOLUTION
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of raulmonda
raulmonda

ASKER

thanks for answer.
1. on my TEXT widget I deleted the html tags and i let the adsence script naked. Same result: no sign of ad, only the allocated area (250px250px)
2. I installed the plugin but it has no option for inserting on the sidebar, only in page, posts or comments. However, when i inspect the element (in Google Chrome) both codes are identical.

Maybe i have to wait for Google to check and approve the AdSence application. But im not sure if the code works; if it doesnt, i will never get the approval.
If the plugin works and its code it's the same with widget code, it means both are working (hopefully).

I will let both codes for couple of days and let Google check the site.

Any other idea how to check if the script is well inserted?

Thank you again.

Regards,
Raul M.
ASKER CERTIFIED SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Thank you for the answer.
I intalled both plugins and ill wait for google to review.

Regards,
Raul M.