01 May 2009

Unable to Move a Widget

::
Suppose you created a widget and it appeared nicely on top of your side bar in Blogger. Then you attempted to move it to a particular place in your layout by dragging and dropping the widget. So far, so good. After the move, you pressed the save button, and... Blogger gave you a cryptic error code. Another try, no go: same error.



First do not despair, it happens to me all the time. The reasons can vary but most of the time, it is a fault of the template. One quick way to solve the problem if you successfully created the widget but you are not happy with its placement is going to the layout tab and clicking the "edit HTML" link without expanding the widget template.

Now find the following section:

<b:section class='sidebar' id='sidebar' preferred='yes'>
<b:widget id='BlogList2' locked='false' title='I read, too' type='BlogList'/>
<b:widget id='HTML2' locked='false' title='' type='HTML'/>
<b:widget id='BlogArchive2' locked='false' title='Past Articles' type='BlogArchive'/>
...
</b:section>

In my case the culprit was the "BlogList2" widget. I did not want it there but my attempts to move it failed. As I wanted it to appear beneath the individual posts, I cut the relevant line (BlogList2) and pasted it in the main section as such:

<b:section class='main' id='main' showaddelement='no'>
<b:widget id='Blog1' locked='true' title='Blog Posts' type='Blog'/>
<b:widget id='BlogList2' locked='false' title='I read, too' type='BlogList'/>
</b:section>

You can use this technique for moving widgets up and down, as well; just cut and paste it to its desired place.

Short URL for this post


2 comments:

  1. This is a great how-to thanks :) But does it only apply to blogspot blogs? or can I use this on wordpress etc?

    ReplyDelete
  2. Yes, it only applies to Blogger / blogspot blogs. I have not used Wordpress before, so I do not know but I do not see any reason why it should not apply. It is all about finding the correct PHP file and editing it, I guess.

    When I find the time I will download WP and run it locally in my PC (one of the advantages of using Linux). Using different sidebars with different widgets or same ones with a different order in index and post pages seems like a good idea regardless of the platform you use for blogging.

    ReplyDelete