Friday, August 24, 2012

How To: Create the Most Basic Blogger Template Possible

Maybe you want to make a blog template from scratch, maybe you just need a blank template. You COULD try striping all the stuff out of an existing one. I did. It was a major pain in the butt. SO! Instead, let's start from scratch and just used the Most Basic Blogger Template Possible.
(Continued after the cut.)

Well, here you go, the most basic template possible to not throw a bX-error:
         <b:include data='blog' name='all-head-content'/>
          <b:if cond='data:blog.pageType == &quot;item&quot;'>
                <data:blog.pageName/> : <data:blog.title/>
        <b:if cond='data:blog.url == data:blog.homepageUrl'></b:if>
        <meta content='' name='description'/>
        <meta content='' name='keywords'/>
        <script src=''/>



<div id='wrapper'>
<b:section id='main' showaddelement='yes'>
<b:widget id='Blog1' locked='false' title='Blog Posts' type='Blog'/>

If you copy-paste this code into blogger's template editor (Template > HTML), and save, you shouldn't get any errors, and will end up with a page that looks like this:

Blogger will also automatically expand the code so that everything works properly, and you can proceed from there. 

Adding CSS

Lucky us, someone's already gone ahead and made a list of CSS classes used by blogger, paste this between <b:skin><![CDATA[ and ]]></b:skin> in the head of your xml document:
/* css classes created by Blogger */


/* Blogger navbar */

/* Header */

/* Sidebar */

/* Main Section */

/* Post Date */{}{}

/* Posts */{}{}{}{}{}{}{}

/* Post Footer */{}{{}{}{}{}{}

/* Post Comments */
div.comments h4{}
dt.comment-author a{}
dt.comment-author avatar-image-container{}
div.comment-form p{}

/* Backlinks */

/* Blog Pager */{}{} a.home-link{}

/* Post Feeds */{}

/ *Footer */

/* ----- Widgets -------*/

/* Blog Archive Widget */
div#ArchiveList ul.hierarchy{}
div#ArchiveList ul.hierarchy li{}
div#ArchiveList ul.hierarchy li a.toggle{}
div#ArchiveList ul.hierarchy li{}
div#ArchiveList ul.hierarchy li{}
div#ArchiveList ul.hierarchy ul.posts{}
div#ArchiveList ul.hierarchy ul.posts li{}

/* Attributiion Widget */
div.Attribution a{}
Again, when you paste this into the very basic blogger template, and paste THAT into the blogger html editor, it will automatically expand to fill in the things blogger needs to function properly

Once you've got all that, you can do the ol' "Right click -> Inspect element" trick to figure out what the hell you're looking at, and then proceed accordingly. I'm just gonna go ahead and assume you know what you're doing.

Adding a Header 

Start by adding a wrapper to the CSS (div.header-wrapper{}) then add the following to the top of the template, above the posts wrapper and right below <body>:
<!--Header -->
<div id='header-wrapper'>
<b:section class='header' id='header' maxwidgets='5' showaddelement='yes'>
<!-- This holds custom widgets -->
<b:widget id='Header1' locked='true' type='Header'/>
<!-- This is the default header banner -->
<!--End of header -->
See that bit that says "maxwidgets='5'"? You can change that to whatever you want. Now, when you go to blogger's "Layout" section now, you should see two new blocks at the top of the page where you can add widgets.

Adding a Footer

As before, add a wrapper to the CSS (div.footer-wrapper{}) then add the following to the bottom of the template, below the end of the posts wrapper and right above </body></html>:
<!--Footer -->
<div id='footer-wrapper'>
<b:section class='footer' id='footer' maxwidgets='5' showaddelement='yes'>
<!--End of footer -->
Now when you go to "Layout" you'll have the option of adding gadgets to the footer. The end result of adding both the header and footer sections should look like this:

Adding Sidebars

Adding sidebars is a bit more complicated, as you actually have to style the things. I suggest just sticking them in a wrapper and floating it to one side, or make multiple columns. I don't care. It's your blog. Here's how you do it:
Step 1. Add a wrapper to the CSS sidecar section (div.sidebar-wrapper{})
Step 2. Find a place to put the sidebar in your code. I put it below the posts wrapper and above the footer.
<!--Sidebar -->
<div id='sidebar-wrapper'>
<b:section class='sidebar' id='sidebar' preferred='yes'></b:section>
<b:section class='sidebar' id='sidebar2' preferred='yes'></b:section>
<!--You can keep adding to these, just make sure the id is different for each.-->
<!--End of sidebar -->
Step 3. Style the posts wrapper and the sidebar wrapper to get the desired result. In the downloadable template, the posts wrapper now looks like this:
#wrapper {
width: 60%;
float: left;
While the sidebar-wrapper looks like this:
div.sidebar-wrapper {
width: 15%;
float: right;
The end result being you now have two editable sections which will appear as a sidebar in the page. Since I did them as percentages, however, they show up as the first two bars beneath the posts section in the blogger layout editor:


If you would like to download the template, you can do so here. To install it on your blog, go to the blog's "Template" page, click "Backup / Restore" (backup your existing template), then upload the .xml file. 


  1. These kind of post are always inspiring and I prefer to read quality content so I happy to find many good point here in the post, writing is simply great, thank you for the post.
    website design

  2. This is a terrific post and lends exceptional clarity. Thank you so very much.

  3. thank you very much!
    been looking for this for a while

  4. Thanks broo,,,,,,, you helped me so much...

  5. Aha... I was searching for a Basic Template so that I can design my own template for blogger from SCRATCH... You saved me Man.. Thanks a lot!

  6. it will be great if you make this tutorial on video like this:

    sadly it wrote on Indonesian Language Y_Y
    it will more easy to understand for begginer like me

  7. but this simplest blog does not show comments

  8. Did you know that you can actually get your ex to call you back, and it's actually really easy, as long as you know what you are doing? Well I'm sure if you knew these sooner, you'd have gotten your ex back by now, but either way, once you use these tricks, your ex will not be able to resist calling you back! Here are 4 tricks to make your ex return your 800.

  9. With the technology today, it is not surprising that a mysterious person can access your phone number and victimize you with frightening phone calls. While there are others who just do it for fun to annoy other people through free business calls you also need to be alert when calls are already threatening and violating your privacy.

  10. Digital Marketing is something that will suit anyone. Right from graduates, sales/marketing professionals, housewives looking for a work at home option or those freelancing enthusiasts. By the way, nice article. Like the way you organised the content...

    SEO Training In Chennai

  11. Amazing information,thank you for your ideas.after along time i have studied an interesting information's.we need more updates in your blog.
    best vmware training in bangalore
    vmware certification bangalore
    vmware Course in Anna Nagar
    vmware Courses in Tnagar

  12. Replica Audemars Piguet Watches, combining elegant style and cutting-edge technology, a variety of styles of Replica Audemars Piguet royal-oak Watches, the pointer walks between your exclusive taste style.