Friday, January 23, 2009

Adding Nuffnang's Alternate Code in Single Post Only in XML Blogger Template

My previous post is about adding AdSense only in single post in XML Blogger Template. Now, Patsy, a blogger friend who visited my blog, commented on that post and asked about adding nuffnang ads instead of AdSense.

I remembered that I have a Nuffnang account and I still haven't tried using there ads. So, I tried changing the AdSense code to Nuffnang. Nuffnang provided to code, the default and the alternate. First, I tried using the default code and it worked properly. However, when I tried using the alternate, it had resulted to an error.

Now, this tutorial is mainly on how to add Nuffnang's Alternate Code in XML Blogger template without an error in relation to my previous post.



Inserting directly the default Nuffnang code would not result to an error. But if you use the alternate code, an error will appear. You still need to convert a few characters into html entities to make it work.

I said only few characters because you only have to change 2 characters repeated twice in the alternate code, the < and the >. Now here's the thing, you need to change "< to &lt;" and "> to &gt;" in the document.write syntax.

It would look like this one: (click image to enlarge)

After modifying the code, you may now proceed with Step 3 of the my previous post.

I would recommend that you just use Nuffnang's default code to make it easier.

That's all folks... Happy Friday to all!
Related Posts Plugin for WordPress, Blogger...