Keep Widgets AND Change Layout Template. ~ The Blog Doctor.

Keep Widgets AND Change Layout Template.

New Visitor? Like what you read? Then please subscribe to my Blog Feed or sign up for Free Email Updates. Thanks for Visiting!

How can I change the Layout template of my blog and keep my widgets? This is one question which occurs frequently to any blogger. As Blogger does not offer any three column templates at present or a template with large amount of customization, many are forced to load layouts from third parties.

Layout templates are different from Classic Templates which can be easily loaded without losing your widgets. If you want to change your Layout template you are forced to first backup widgets template data which otherwise would have been lost in the change. The other method is to change the template and then reload your widgets which takes time if you happen to have tons of widgets like mine. Here is a simpler method to keep widgets AND change the layout template..........


Here is what happens when you get bored with the standard Blogspot templates :

1. You do a Google search for "XML Blogger Layout Template Free"

2. You find a site offering free Blogger Layouts.

3. You download the XML file to your PC.

4. You login at and click Layout link on Dashboard. Then you click on Edit Html subtab of Template tab.

5. Above the Template code box you click on Browse button to navigate to the XML template file on your PC. You select the file and click Open.

6. Then you click the Upload button to upload the selected file to Blogger.

WHAM! Blogger hits you with this warning message :

Widgets are about to be deleted :

Please confirm that the following
widgets should be deleted. All the widgets' configuration data will be lost.


See picture below :

If you click the 'Confirm and Save' button the widgets will be lost unless you had them backed up. If you click the Cancel button the new layout template will not load.

So you land up between the devil and the deep blue sea and the process is aborted.


1. IDENTIFY YOUR WIDGETS : First you have to identify your widgets code. In the Blogger Layout templates each Page Element is executed by widget code in the template. To see the widget code login at and click on Layout link on the Dashboard. Then click on Edit Html subtab of Template tab. DO NOT CLICK THE EXPAND WIDGETS TEMPLATE check box! Scroll down in Template code box :

The code for the widgets is in red. Each page element is represented by a single line of code in the unexpanded template like this :

<b:widget id='Profile1' locked='false' title='About Me' type='Profile'/>

2. OPEN THE NEW LAYOUT TEMPLATE : Open the downloaded layout template (XML) file in Notepad. Identify the NON_WIDGET portion in the file. This is shown in black in the example Minima template file above.

3. COPY_PASTE THE NON_WIDGET CODE : Carefully select the NON-WIDGET code from the top of the template to the first widget code line in the new Layout template. Paste it instead of the same code in your Template box from the top of your template to the beginning of the first widget code line. Repeat the process for the rest of the NON-WIDGET code between the widgets and below the last widget code line in your template.

If you have done this carefully you will have replaced the whole template AROUND your widgets while keeping them intact.

4. PREVIEW BEFORE SAVING : The last step is to click the Preview button below the Template Code box. If you have done everything correctly your blog will open in a new window with the new layout template. Otherwise it will give you an error message. This is the advantage of Preview as it does not save the errors, if any, and gives you the opportunity of correcting them.


Col. B. Bunny said...

Thank you for taking the time to put that up. I found it very illuminating. Getting a handle on widgets is taking a lot of time and this is a good fundamental piece on a topic that I've wondered about.

Amanda Sewell said...

I have my widgets saved into a text pad file using the page source, and I am trying to figure out how to add the widgets back into my new template that I put on the blog! Any help you would provide would be greatly appreciated! Thanks for your great blog and all the help!


Vin said...


Have a look at :

How to Add Widgets to Blog.

Copy the content of the widgets from the source code and paste it in Html Page elements/widgets.

Tim Turner said...

Sorry, I tried to post a question but when I clicked on Submit, it simply reloaded the page with my comment still in the typing box.. not sure if you got it or not.

Vin said...


If the comment page reloads with the comment still in the comment box then look for an error message in the page.

~Amod~ said...

Thanks man..It was very helpful. So many people face this problem, but few are keen to help others. Much appreciated.

Ron Southern said...

I understand what you finally arrivcd at and it sounds right, though I have not attempted any of these methods, not wishing to replace my template. It seemed long to me, but maybe I'm just getting too old or too feeble or both. If the post had started with some hint of what the final solution was, I wouldn't have felt so DELAYED having to read all the firt, second, and third steps (etc.) I have trouble with all the fine print these days, even this crap I'm typing now. Given a chance I'll misspell my own name. And having a stroke didn't help me follow long sets of directions. I repeat that a quick synopsis of the final solution at the beginning would have helped. Then reading all the other steps would have been easier fo the slow thinkers like me.

Vin said...

Ron Southern,

Thanks for the suggestion. Perhaps in the begginning I should put in a direct link to "The Solution" at the bottom.


Very informative and helpful. Except that i seem to have a problem understanding the direction no. 2. I can't identify the non-widget code as mentioned by you. You say to look up the example minima black template and i don't see that either.

Your help would be greatly appreciated as i want to change the layout of my blog and i have a dozen of widgets


Vin said...


Perhaps the Scribd document is not loading on your browser. Go to and see if some of their documents are seen in your browser.

You may need to download Macromedia Flash plugin for your browser.



Thanks for replying!

I can see the scribd doc on my browser. There's no problem there. I just don't know what is the 'non-widget' portion. Everything's in black in the doc. I can see few codes in red and those are the codes for the widgets.

I'm clear about what to cut and copy, i'm just not clear about where exactly to paste within my new template.


Vin said...


The nonwidget code is all the code lines in black. Replace them with corresponding code lines from the new layout template.

To keep your widgets intact you have to work around them and replace only the rest of the code.

The actual widget code lines will differ from blog to blog. I have showed a sample line from which you can identify your widget code lines.

snam said...

What is the NON_WIDGET code? That is the part I am still stuck on. The other steps after it look easy but this one is confusing. Please clarify. Thanks.

snam said...

Sorry for not reading the previous posts. I get it now.

snam said...

Is there any program that lets me do this? Or do I have to do it manually because I have a TON of widgets and I can't do this! Do you think you could do it for me? Or is there any program or plug in that lets me do this? Is there a name to this process or is this considered a hack?

Vin said...


AFAIK there is no program. You have to do it manually. Also see How to Backup Widgets Data?

[s.E.p.E.t] said...

hello, vin.. i really really need your help.. i've download a template and already backed up my old template but when i try to put all the widgets back it says 'we were unable to preview your template'.. so how? i jus want my widgets back.. thanks.

Vin said...


You have to upload widgets separately afterwards if you have changed to a third party template.

fbminis said...

Hello Vin,

I have 2 blogs.

Can I copy the Links Widget I have in Blog #1 and paste it in my Blog #2?

Here's my main blog:

Can I grab that link-list widget named "Favourites" and create an equal widget in the following blog?

Thanks in advance,



Skip to top of post.

Search Blog Before Commenting


Post a Comment

Please use the above search box to search this blog before posting your valuable comments.

Comments posted on Dummies Guide to Google Blogger (Beta) are moderated and will be approved only if they are on-topic and not abusive. Try not to include website URLs/links in your comments. You can email me : drbhatns at gmail dot com for any blogging question. Thanks,


The Blog Doctor The Blog Doctor2 Blog Doctor Home


Tips On Blogger and Latest News.

Skip to top of post.