How to Hide a Page Element in Blogger blog

Blogger uses Page Elements to enable users to add modules containing code, multimedia etc., to their blog. You can move these page elements on Layout---->Page Elements subtab to customize the look of your blog. You can also hide a Page Element if you want to instead of removing it completely.



Page Elements are executed on the web page of your blog by code snippets called widgets. Login at Blogger.com and click on Layouts link on Dashboard. Here you can see the Page Elements in a GUI (graphical User Interface). You can move, add or delete them here without getting your hands dirty messing with the widgets code.



For the slightly more adventurous click the Edit Html subtab of Layout tab. The Template Code box can be seen on this page. First backup the template by clicking the Download Full Template link at the top of the page. Scroll down in the Template Code box and look for the widgets code after the body tag :




Above is the widget code for a Page Element of the type Html/Javascript. Note the widget type changes according to the type of the widget. If it is a Profile widget it will say 'Profile' in the code line. If it is a Text widget it will say 'Text'. The number depends on how many widgets of he same type you have in that blog.


To hide the widget take the widget id and put it in code like this :

#HTML2 {
display:none;
}

Then paste the code immediately above the ]]>
tag in your template code box. Preview and you will see that the Page Element specified in the code is no longer seen on the blog. Save the template.


0 comments: