For those using Google’s “Blogger” you’ve probably noticed several limitations. One of the largest limitations is its inability to include script (<script></script>) tags within your post. Well, I’ve decided to be a little creative and come up with an easy to use, easy to implement solution!
I won’t beat around the bush with a long post; lets just get right down to it. Since Blogger won’t publish a post with the <script> tag; you’ll have to use something that Blogger doesn’t block – but what? Blogger doesn’t seem to have an issue with server side includes, SSI. So, it is a little “hacky”, but it gets the job done. Simply place your <script></script> tag in an include file and then reference the include file within your post (where you would have referenced the script tag initially).
That was easy enough! Granted it takes an additional step, but isn’t that better than not having the ability at all? In case you are having any doubts on my solution – just use this blog post as an example. The only way I could get the “Digg” widget within my post was to place it in its own individual include file and reference that include within my post.
Curious about the redesign? It's more of a design satire then a reflection of personal taste: Read More
You don’t say if the blog is hosted on Blogger or your own site. The way I read the #include tag, the file to be included has to be in the same path as the template…
Mark,
Sorry for the confusion. Yes, I host my blogger blog on my own site. Hosting on your own site is the only way to really manipulate the code — from my understanding.
Especially when using SSI, the include must be on the same site as the blog. So if you are hosting your blog on blogspot, this little trick won’t help to much — sorry!
I do hear the Blogger Beta is brining some cool new functions that are ONLY available to blogspot accounts, so perhaps the issue will be solved there.
Best of luck.