How do I make blogger homepage full width and hide sidebar?

1.1k Views Asked by At

I am using blogger and want to hide the side bar from my blog homepage to make the posts full width and look more customized/proffesional, my website is nijeva.ca and I am using a custom theme template that isn't one of bloggers defaults.

I have attempted to use a code before but it always says you cannot place a b:if code there.

1

There are 1 best solutions below

0
PlWeb On

Try this:

Go to “Template” > “Edit HTML“
Click inside the HTML editor

Use CTRL+F to find the second <head/> in your blog’s HTML
Past the given code Above it. This for Home page

<b:if cond='data:blog.pageType == "item"'>
    <style>
        .sidebar {
            display:none;
        }
        #main-wrapper {
            width: 99%; 
            float: none; 
            margin: 0px auto;
        }
        html {
            overflow-x: hidden;
        } 
        .post {
            width: 97%; 
            margin: 15px auto;
            } 
        .post h3 a { 
            text-align: center; 
            padding:5px;
        }
    </style>
</b:if>

And this for Static Page

<b:if cond='data:blog.pageType ==  &quot;static_page&quot;
'<style>
    .sidebar {
        display:none;
    }
    #main-wrapper {
        width: 99%; 
        float: none; 
        margin: 0px auto;
    }
    html {
        overflow-x: hidden;
    }
    .post {
        width: 97%; 
        margin: 15px auto;
    } 
    .post h3 a { 
        text-align: center; 
        padding:5px;
    }
</style>
</b:if>