Author: phpLD Added: February 19, 2006 So you've decided to add your Google Adsense code to a Smarty template, but it isn't working. You probably didn't add the literal tag. Not to worry!
First open up the template file where you want to add the Google Adsense code. For example, it might be header.tpl or main.tpl or footer.tpl.
Next locate the place on the page where you want to add your Adsense code. The most important step now is to enclose your Adsense code with the Literal tag, so all you will do is add {literal} before your code and {/literal} after your code. Example:
{literal} Insert your Google Adsense code here. Just copy and paste it from Google's web site. {/literal}
And that's all you have to do to get it working! Good Luck! (And also note, you can use the same procedure to add Google Analytics code too!)
|