Do you wish to take away the sidebar out of your WordPress web site?
The sidebar is a widget-ready space in your WordPress theme the place you may present data that isn’t a part of the principle web page content material. Nevertheless, sidebars may be distracting and take up helpful area.
On this article, we are going to present you the way to simply take away the sidebar in WordPress.
Why Take away the Sidebar in WordPress?
Most free and paid WordPress themes include a number of sidebars or widget-ready areas.
You should use sidebars to point out an inventory of your current posts, adverts, e-mail listing signup varieties, or another content material that isn’t a part of the principle web page or put up.
At WPBeginner, we use a sidebar to advertise our social media pages and show our hottest posts.
You’ll be able to simply add gadgets to a theme’s sidebar utilizing WordPress widgets.
In most WordPress themes, the sidebar appears completely different relying on whether or not the customer is seeing your web site on a desktop or cellular machine. Since smartphones and tablets have smaller screens, WordPress usually strikes the sidebars to the underside of the display screen.
Relying on how your web site is ready up, this will likely look unusual. Guests will even have to scroll to the very backside of the display screen to see the sidebar content material, which can have an effect on the person expertise and your conversion charges.
For extra data, please see our information on the way to view the cellular model of WordPress websites from desktop.
Even on a desktop, there’s an opportunity that the sidebar could conflict together with your design or distract from crucial content material, such because the web page’s name to motion.
With that being stated, let’s see how one can take away the sidebar in WordPress. We’ll present you the way to delete the sidebar out of your whole web site, and the way to conceal the sidebar on a particular web page or put up solely.
Video Tutorial
If you happen to don’t just like the video or want extra directions, then proceed studying. If you happen to want to leap straight to a selected methodology, then you need to use the hyperlinks beneath.
Technique 1. Eradicating Sidebars Utilizing Your WordPress Theme Settings
Lots of the greatest WordPress themes include built-in settings to take away sidebars. Relying in your theme, you may take away them site-wide, or just take away them from particular person posts or pages.
The best solution to examine whether or not your theme has these settings is to launch the theme customizer. In your WordPress dashboard, go to Look » Customise.
Within the left-hand menu, search for a ‘Sidebar’ or related setting.
Within the following picture, you may see the choices for the favored Astra WordPress theme.
If you happen to do see a ‘Sidebar’ possibility, then click on on it after which search for any settings that can take away the sidebar.
This may be a dropdown menu, thumbnails exhibiting the completely different sidebar layouts, or another setting.
In case your theme doesn’t have a ‘Sidebar’ possibility, you then could possibly take away the sidebar by choosing the ‘Web page’ or related part.
As you may see within the following picture, Astra additionally has a ‘Web page’ setting.
Inside this setting, you’ll see completely different layouts together with a number of that take away the sidebar akin to ‘No sidebar’ and ‘Full Width / Stretched.’
Merely click on on the completely different thumbnails to use these layouts to your web site.
Irrespective of the way you take away the sidebar, don’t neglect to click on on ‘Publish.’
Some WordPress themes even have settings that let you take away the sidebar from particular person posts and pages. This may be helpful when designing customized pages, akin to a touchdown web page.
To see whether or not your theme comes with these settings, merely edit any web page or put up the place you wish to conceal the sidebar. Within the right-hand menu, choose both ‘Publish’ or ‘Web page’ after which search for a ‘Publish Settings’ or ‘Web page Settings’ possibility.
In case your theme has this part, then click on to develop. Now you can search for any settings that let you take away the sidebar.
Within the following picture, you may see the put up settings for the favored ThemeIsle Hestia theme.
Remember the fact that some WordPress themes could not let you simply take away the sidebar utilizing the customizer or web page editor. If so, then keep on studying and we’ll present you different methods to take away the sidebar in WordPress.
Technique 2. Eradicating the Sidebar Utilizing the Full Web site Editor
If you happen to’re utilizing a block theme, then you may take away the sidebar utilizing Full Web site Modifying (FSE) and the block editor.
This methodology is a fast and straightforward solution to take away the sidebar throughout your whole web site, though it gained’t work with all themes.
To launch the editor, go to Look » Editor.
Now you can click on to pick the sidebar.
Within the small toolbar that seems, click on on the dotted icon.
Now you can delete the sidebar by clicking on the ‘Take away Column’ or related setting.
When you’ve performed that, you may go forward and click on on the ‘Save’ button.
Now, when you go to the entrance finish of your WordPress web site, you’ll see that the toolbar has disappeared.
Technique 3. Eradicating the WordPress Sidebar Utilizing Code
This methodology lets you merely take away sidebars from each web page and put up in your WordPress web site.
You will have to edit your theme information, so it’s not probably the most beginner-friendly possibility. Nevertheless, this methodology ought to work for many WordPress themes, together with themes that don’t have a built-in solution to conceal the sidebar.
Remember the fact that when you edit your WordPress theme information immediately, then these modifications will disappear once you replace the theme.
With that being stated, we advocate creating a toddler theme as this lets you replace your WordPress theme with out dropping customization.
First, it’s good to connect with your WordPress web site utilizing an FTP shopper akin to FileZilla, or you need to use the file supervisor of your WordPress internet hosting cPanel. Or when you’re a SiteGround person, your Web site Instruments dashboard.
If that is your first time utilizing FTP, then you may see our full information on how to connect with your web site utilizing FTP.
When you’re related, go to /wp-content/themes/ and open the folder on your present WordPress theme.
WordPress themes are made up of various templates, so you have to to edit all of the templates that embrace a sidebar. To work out what information it’s good to edit, see our information to WordPress template hierarchy.
For instance, you might have to edit index.php, web page.php, single.php, archive.php, house.php, and so forth.
To edit a file, open it in a textual content editor akin to Notepad. Then, discover the road that appears like this:
<?php get_sidebar(); ?>
</pre>
In case your theme has a number of sidebars, then the code will look barely completely different and there could also be a number of items of sidebar code. Sometimes, this code may have a sidebar identify contained in the perform, for instance:
<?php get_sidebar(‘footer-widget-area’); ?>
</pre>
You’ll be able to merely delete the road for the sidebar that you simply wish to take away.
Now, save and add the file again to your WordPress internet hosting account. Merely repeat the method described above for all of the template information that embrace a sidebar.
If you’re completed, you may go to your WordPress weblog to see the change in motion.
You might discover that though the sidebars are gone, your content material space continues to be the identical width, which leaves the sidebar space empty.
This occurs when the theme has an outlined width for the content material space. After eradicating the sidebar, it’s good to modify the width of the content material space by including customized CSS to your WordPress theme.
To do that, go to Theme » Customise. Within the left-hand menu, click on on Extra CSS.
Now you can go forward and paste the next code into the little code editor:
.content-area {
width: 100%;
margin: 0px;
border: 0px;
padding: 0px;
}
.content-area .web site {
margin:0px;
}
</pre>
Don’t neglect to click on on the ‘Publish’ button. Now, when you go to your web site you’ll see that the content material space now takes up 100% of the out there area.
Technique 4. Eradicating Sidebars From Particular person Pages in WordPress
You might solely wish to take away the sidebar on sure pages whereas exhibiting the sidebar on different areas of your web site. For instance, many web sites don’t present the sidebar on their gross sales pages, as this will distract from the web page’s name to motion.
If you happen to simply wish to take away the sidebar from a particular web page, then we advocate utilizing a web page builder plugin like SeedProd.
SeedProd allows you to design any form of web page utilizing a easy drag-and-drop editor. This makes it simple so as to add and take away the sidebar from any web page.
Within the SeedProd editor, merely click on to pick the sidebar you wish to take away. Then, go forward and click on on the trash can icon.
If you wish to take away the sidebar out of your whole web site, then you may also use SeedProd to simply create a customized theme that doesn’t have any sidebars.
Technique 5. Eradicating Sidebars from a Static Web page in WordPress
Some WordPress themes include a number of templates, together with full-width web page templates that don’t present the sidebar on both aspect of the content material. You should use these templates to take away the sidebar from any web page.
To see whether or not your theme has a full-width template, merely open any web page. Within the right-hand menu, choose the ‘Web page’ tab and search for a ‘Template’ part.
If you happen to discover this part, then click on on it to see all of the choices out there.
Now you can open the dropdown menu and search for a full-width template.
In case your theme doesn’t have a full-width template, then you may create one manually.
Open a plain textual content editor like Notepad and paste the next code in a clean file:
<?php
/*
*
Template Identify: Full-Width
*/
get_header(); ?>
</pre>
Now you can save this file with the identify full-width.php.
After that, connect with your web site utilizing an FTP shopper or the file supervisor equipped by your WordPress internet hosting supplier.
Then, go to /wp-content/themes/ and open the folder on your present theme. Inside this folder, discover the web page.php file and open it in any textual content editor.
Now, copy all the things that seems after the <?php get_header(); ?> line and paste it into your full-width.php file.
When you’ve performed that, discover and delete the road that appears like this:
<?php get_sidebar(); ?>
</pre>
Now you can save your modifications and add the full-width.php file to your theme folder.
Now you can use this template with any web page. Merely open the ‘Template’ dropdown within the right-hand menu and choose your full-width template.
Observe: When you have a web page open within the content material editor whereas creating the full-width.php file, you’ll have to refresh the editor for the brand new template to seem within the dropdown menu.
For extra particulars, see our information on the way to create a full width web page template in WordPress.
Technique 6. Take away the Sidebar from a Single Publish in WordPress
Similar to pages, WordPress additionally comes with built-in help for put up templates.
If you wish to take away the sidebar from sure single posts, then you may create a customized single-post template. It’s just like making a full-width web page template.
First, you’ll have to create a brand new template file utilizing a textual content editor like Notepad. When you’ve performed that, you may copy and paste the next code in that file:
<?php
/*
* Template Identify: Featured Article
* Template Publish Kind: put up, web page, product
*/
get_header(); ?>
</pre>
This code creates a brand new template referred to as ‘Featured Article’ and makes it out there for any web page or put up, plus any product put up varieties in your on-line retailer.
In your customized single put up template, you merely have to take away the sidebar a part of the code. For extra data, you may observe the steps outlined in our information on the way to create customized single put up templates in WordPress.
If you’re performed, save this file as full-width.php.
Subsequent, it’s good to add the file to your present WordPress theme folder utilizing an FTP shopper or file supervisor.
When you’ve performed that, you may apply this template to any put up. Within the right-hand menu, merely click on to develop the ‘Templates’ part after which choose the full-width template.
We hope this text helped you discover ways to simply take away the sidebar in your WordPress theme. You may additionally wish to see our step-by-step information on the way to enhance WordPress pace and efficiency, and our comparability of the most effective e-mail advertising providers to develop your site visitors & gross sales.
If you happen to favored this text, then please subscribe to our YouTube Channel for WordPress video tutorials. You may also discover us on Twitter and Fb.
The put up The right way to Take away the Sidebar in WordPress first appeared on WPBeginner.
Subscribe to MarketingSolution.
Receive web development discounts & web design tutorials.
Now! Lets GROW Together!