third-party sites that they are not integrated with (eg PayPal, Flickr, Amazon, Facebook, Twitter, LinkedIn), into your blog.
If you have a layout or designer template (ref What type of template do you have?), there are three ways to put outside code into your blog:
- Option one: In a widget/gadget.
These can be placed in any location the Design > Page Elements screen gives you access to - usually go into the header, footer or sidebar.
- Option two: Inside a specific Post (or Page)
This means that the effect of the code will be shown every time the post is viewed
- Option three: In the blog's layout template
This gives you most control over where and how the item appears, but is also the hardest.
If you are using a dynamic template, then you face more limitations: you can put code into posts/pages for sure, but (for the moment anyway) there are limits to what gadgets can be added. And editing your template may be more challenging, because the template-structure is so different.
Warning:By letting us put 3rd-party code into our Blogger is giving us the responsibility for making sure that only code from trust-worthy sources is used.
If you install code from unreliable sources, you may find that your blog is "hacked" in some way.
Every time that someone wants you to install something to your blog, think very carefully about how much you should trust them.
Option 1: Putting third party code in a gadget
- Copy the code from the third-party site.
Don't use the search tool to find it, because currently (2/11/10), it returns a 3rd party gadget that doesn't work.)
- Paste the code into the Contents field.
- Enter a title, if you want the gadget to have one
- Press Save.
- Drag-and-drop the new gadget to where you want it to appear.
- Save the layout
- If you also have a mobile template set up for your blog, and you want this gadget to show up on it, then you need to enable the gadget specifically for it.
Some sites either give you the HTML, and also button that will put their gadget (etc) directly into your blog. I only use these type of buttons if the address bar in the screen that opens has an address starting with blogger.com: if it has something else, then the third-party site may be collecting your Google account password along the way
Option Two: Put third-party code inside a post
- Copy the code from the third party site
- Go to blogger and Edit the Post (or Page) that you want to put it on
- Switch into HTML mode
- Paste the code in at the place where you want the item to go. If you are not familiar with HTML, it may help to put in some marker text at the place where you want the product link while you're still in Compose mode. Then switch to Edit HTML mode, find it and replace it with the third-part code.
- Switch back to Compose mode This sometimes lets you see the 3rd party item within the post editor - although sometimes it just shows as a blank box, or even just as a blank line (I sometimes surround lines like this with some marker text, eg xxx, while I'm editing the post, to make sure I don't accidentally over-type of the code.If you forget to go back to Compose mode before you press Publish, you may get confused the next time you edit a post.
Option Three: Put the third-party code into your template
You should only use this option if you are very familiar with how your template works, and you accept the disadvantages of editing it.
Also, be aware that for some third-parties, putting the code into your template can over-ride controls that usually come with it (eg for AdSense, only displaying up to three ad-units and three link-units per screen). For other types of code, the tweaks that are needed to make it work within Blogger may break the other parties terms-and-conditions (eg if they say you cannot change the code at all). You need to weigh up the risks and issues involved for each individual third party.
- Edit your template in the usual way
- Work out where exactly the code needs to go, and put it there.
- Preview the change, to make sure it works
- Save the template
Editing your blog's template: advantanges and disadvantages
Types of blogger template
Enabling a mobile template for your blog
Choosing which gadgets are shown on your mobile-template view
Blogger and other Google products
Blogger and some key non-Google products
Amazon integration with Blogger
Putting Chitika ads onto your blog