In this tutorial, we are going to remove the left sidebar of Twenty Fourteen.
But first, what you will need is creating the child theme, click here, if you don’t have one yet.
Although this default theme is extremely great for mobile devices because it’s made to be mobile responsive.
However, I personally, don’t really like the left sidebar which is glued on the left side of my screen in Desktop view.
The look of the original left sidebar of Twenty Fourteen
Below is the look of the site with no left sidebar, and center aligned to page, after doing these steps
The process will be a little bit longer, as shown also in the video tutorial, but if you don’t have time for it, then just copy the code below, for functions.php and the style.css.
Alternatively, you can modify it fast and easily with the plugin, called, Twenty Fourteen extended (Update 22 July 2014 – the plugin is apparently removed from WordPress plugin directory).
I did also try this awesome plugin, however I find one small drawback which is to me, personally important. When I view the page source, the long css code is added to my header area, which I personally prefer it to be clean. So it is a personal preference.
Also in the video, I mentioned, the other way, is you can install the plugin, copy and paste the added css file after modification, and add it manually to your child theme style.css file. And then deactivate the plugin.
So it is up to you, let’s move on the way how I remove Twenty Fourteen left sidebar.
Steps to remove the left sidebar of Twenty Fourteen child theme.
1. Go to and read this removing sidebar codex. If you want faster way, copy the functions.php and style.css code below.
2. Inside your child theme folder, create a new file, name it, functions.php (if you followed my tutorial, then you only have style.css there). And add this code there, and save.
<?php // Removing left sidebar of Twenty Fourteen function remove_left_sidebar(){ unregister_sidebar( 'sidebar-1' ); } add_action( 'widgets_init', 'remove_left_sidebar', 11 ); ?>
Note: if you already have some codes in your functions.php, add it before php closing tag ?>.
3. Then inside your style.css, add the code below and save. (you can delete the background color modification, I forgot to mention it in the video 🙂
@media screen and (min-width: 783px) { .primary-navigation { float: right; margin-left: 20px; } } .site { margin: 0 auto; } @media screen and (min-width: 1110px) { .archive-header, .comments-area, .image-navigation, .page-header, .page-content, .post-navigation, .site-content .entry-header, .site-content .entry-content, .site-content .entry-summary, .site-content footer.entry-meta { padding-left: 55px; } } .site-content .entry-header, .site-content .entry-content, .site-content .entry-summary, .site-content .entry-meta, .page-content { max-width: 874px; } .comments-area { max-width: 874px; } .post-navigation, .image-navigation { max-width: 874px; } .site:before, #secondary { width: 0; display: none; } .featured-content { padding-left: 0; } .site-content, .site-main .widecolumn { margin-left: 0; } .hentry { max-width: 900px; } .post-thumbnail img { width: 100%; }
Your site will have no left sidebar, and it’s aligned to the center of the page.
Thanks for the tips. Great post
And thank you for stopping by and leaving a comment 😀
Hi, this is great and very helpful. One thing I don’t like about the extended plugin is that you can’t use the default page template if you remove the left sidebar, you have to use the full width page template which means no right sidebar widgets.
However I would like to be able to remove the left sidebar only on some pages and posts, not site-wide. Are you able to tell me either how to do this or what I should search for to find the answer?
Hi Gruffalos,
You can use page templates, so basically you get the post ID or page ID and define it inside functions.php, then disable from there.
Here is a good resource: http://codex.wordpress.org/Page_Templates
And the support forum: http://wordpress.org/support/
Hope this helps
Kind regards
Kimi.
Actually I just thought of a way to do it-make a new page template that has the right sidebar, but remove the left sidebar.
add
.main-content {
min-height: 100vh;
}
to your css copy paste
Thank you so much for the tutorial. I have built a couple blogs in the past and used Thesis 1.8 but I have not been able to find it again. Anyways I found the twenty fourteen theme and liked it other than the way it was set up. Looked kinda silly. Thanks Again
My pleasure Chris, Happy 2015 to you and yours 😀
hi, i just want to remove sidebar and i want to set full width, not center it.
can you tell me how to do this?
thank you
Hi can you upload the html source code of your demo site without sidebar please?