Why Google Adsense not Appearing in Text Leafs?

I was trying to add Google Adsense into the Category and Archive Sections but just had no luck getting it to work. I went to the Visual Editor and add in a “Text/HTML/PHP” Leafs (Text Leafs in short hereafter) on top of the Category and Archive sections but there was nothing displayed.

To confirm that the Google Adsense code was working well, I tried adding it using Easy Hooks. I went to the wordpress dashboard and pasted the code in Easy Hooks and yes, it was displayed correctly so the culprit was the Text Leafs.

From the Headway Premium Forum, it seems that the Text Leafs has problem parsing Google Adsense code, most members were unable to get it work properly. I almost want to give up but 2 days later, I received a replied from a forum member – Perryd.

Perryd advised that I put the Google Adsense code inside a table before pasting it into the Leaf, such as the following.
<table border="0" align="left"/><tr/><td/><script type="text/javascript"/><!--
google_ad_client = "pub-1334005839044281";
/* 468x60, ATT */
google_ad_slot = "1320042733";
google_ad_width = 468;
google_ad_height = 60;
//--/>
</script/>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"/>
</script/></td/></tr/></table/>
(Note: Do not use the above Google Adsense code, copy the code from your own Adsense account).

And guess what! It works perfectly! Never knew it could be so easy, thank you so much Perryd!

Please also note that your script should NOT be in Capital. I was using an old HTML editor to create the table and it gave me the following script in capital format.

<TABLE CELLPADDING="0" CELLSPACING="0"/>
  <TR/>
    <TD HEIGHT="13"/><SCRIPT TYPE="text/javascript"/><!--
google_ad_client = "pub-0668224738533260";
/* 468x60, ATT */
google_ad_slot = "1210042536";
google_ad_width = 468;
google_ad_height = 60;
//--/>
</SCRIPT/></TD/>
  </TR/>
  </TABLE/>

If you use this code, it did not work in Headway Premium Theme Leafs so you have to change the script to lower case in order for it to work properly.

Comments

Popular posts from this blog

Headway Visual Editor not Loading in the Browser