How to Remove the Sidebar in WordPress

0
60

Do you need to take away the sidebar out of your WordPress website?

The sidebar is a widget-ready space in your WordPress theme the place you may present info that isn’t a part of the predominant web page content material. However, sidebars may be distracting and take up helpful house.

In this text, we are going to present you the way to simply take away the sidebar in WordPress.

How to remove the sidebar in WordPress

Why Remove the Sidebar in WordPress?

Most free and paid WordPress themes include a number of sidebars or widget-ready areas.

You can use sidebars to present a listing of your current posts, adverts, email list signup forms, or another content material that isn’t a part of the predominant web page or submit.

At WPBeginner, we use a sidebar to promote our social media pages and display our most popular posts.

An example of a WordPress sidebar

You can simply add objects 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 website on a desktop or cell gadget. Since smartphones and tablets have smaller screens, WordPress sometimes strikes the sidebars to the backside of the display.

Depending on how your website is about up, this will look unusual. Visitors may even want to scroll to the very backside of the display to see the sidebar content material, which can have an effect on the consumer expertise and your conversion charges.

For extra info, please see our information on how to view the mobile version of WordPress sites from desktop.

Even on a desktop, there’s an opportunity that the sidebar might conflict along with your design or distract from the most vital content material, resembling the web page’s call to action.

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 complete website, and the way to conceal the sidebar on a particular web page or submit solely.

Video Tutorial

If you don’t like the video or want extra directions, then proceed studying. If you favor to soar straight to a specific methodology, then you should utilize the hyperlinks beneath.

Method 1. Removing Sidebars Using Your WordPress Theme Settings

Many of the best WordPress themes include built-in settings to take away sidebars. Depending in your theme, you may take away them site-wide, or just take away them from particular person posts or pages.

The simplest way to examine whether or not your theme has these settings is to launch the theme customizer. In your WordPress dashboard, go to Appearance » Customize.

Launching the WordPress Customizer

In the left-hand menu, search for a ‘Sidebar’ or related setting.

In the following picture, you may see the choices for the well-liked Astra WordPress theme.

The theme settings for the Astra theme

If you do see a ‘Sidebar’ possibility, then click on on it after which search for any settings that may take away the sidebar.

This may be a dropdown menu, thumbnails displaying the completely different sidebar layouts, or another setting.

Removing the sidebar using the WordPress Customizer

If your theme doesn’t have a ‘Sidebar’ possibility, then you could give you the option to take away the sidebar by deciding on the ‘Page’ or related part.

As you may see in the following picture, Astra additionally has a ‘Page’ setting.

Changing the page layout in the WordPress customizer

Inside this setting, you’ll see completely different layouts together with a number of that take away the sidebar resembling ‘No sidebar’ and ‘Full Width / Stretched.’

Simply click on on the completely different thumbnails to apply these layouts to your website.

Deleting the sidebar using the WordPress Customizer

No matter the way you take away the sidebar, don’t neglect to click on on ‘Publish.’

Some WordPress themes even have settings that enable you to take away the sidebar from particular person posts and pages. This may be helpful when designing customized pages, resembling a landing page.

To see whether or not your theme comes with these settings, merely edit any web page or submit the place you need to conceal the sidebar. In the right-hand menu, choose both ‘Post’ or ‘Page’ after which search for a ‘Post Settings’ or ‘Page Settings’ possibility.

The page settings for the Hestia theme

If your theme has this part, then click on to broaden. You can now search for any settings that enable you to take away the sidebar.

In the following picture, you may see the submit settings for the well-liked ThemeIsle Hestia theme.

The Post Settings section

Keep in thoughts that some WordPress themes might not enable you to simply take away the sidebar utilizing the customizer or web page editor. If that is the case, then stick with it studying and we’ll present you different methods to take away the sidebar in WordPress.

Method 2. Removing the Sidebar Using the Full Site Editor

If you’re utilizing a block theme, then you may take away the sidebar utilizing Full Site Editing (FSE) and the block editor.

This methodology is a fast and simple method to take away the sidebar throughout your complete website, though it received’t work with all themes.

To launch the editor, go to Appearance » Editor.

How to launch the FSE

You can now click on to choose the sidebar.

In the small toolbar that seems, click on on the dotted icon.

Customize the sidebar using the full site editor

You can now delete the sidebar by clicking on the ‘Remove Column’ or related setting.

Once you’ve performed that, you may go forward and click on on the ‘Save’ button.

Removing the sidebar using the full site editor

Now, in case you go to the entrance finish of your WordPress website, you’ll see that the toolbar has disappeared.

Method 3. Removing the WordPress Sidebar Using Code

This methodology permits you to merely take away sidebars from each page and post in your WordPress website.

You will want to edit your theme recordsdata, so it’s not the most beginner-friendly possibility. However, this methodology ought to work for many WordPress themes, together with themes that don’t have a built-in method to conceal the sidebar.

Keep in thoughts that in case you edit your WordPress theme recordsdata straight, then these modifications will disappear while you replace the theme.

With that being stated, we suggest creating a child theme as this enables you to update your WordPress theme without losing customization.

First, you want to join to your WordPress website using an FTP client resembling FileZilla, or you should utilize the file supervisor of your WordPress hosting cPanel. Or in case you’re a SiteGround consumer, your Site Tools dashboard.

If that is your first time utilizing FTP, then you may see our full information on how to connect to your site using FTP

Once you’re linked, go to /wp-content/themes/ and open the folder in your present WordPress theme.

The FileZilla FTP client

WordPress themes are made up of various templates, so you will want to edit all the templates that embrace a sidebar. To work out what recordsdata you want to edit, see our information to WordPress template hierarchy.

For instance, you could want to edit index.php, web page.php, single.php, archive.php, house.php, and so forth.

To edit a file, open it in a text editor resembling Notepad. Then, discover the line that appears like this:

<pre class="wp-block-syntaxhighlighter-code">
<?php get_sidebar(); ?>
</pre>

If 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. Typically, this code can have a sidebar identify inside the operate, for instance:

<pre class="wp-block-syntaxhighlighter-code">
<?php get_sidebar('footer-widget-area'); ?>
</pre>

You can merely delete the line for the sidebar that you really want to take away.

Now, save and add the file again to your WordPress hosting account. Simply repeat the course of described above for all the template recordsdata that embrace a sidebar.

When you’re completed, you may go to your WordPress blog to see the change in motion.

You might discover that though the sidebars are gone, your content material space continues to be the similar width, which leaves the sidebar space empty.

An empty space where the sidebar should be

This occurs when the theme has an outlined width for the content material space. After eradicating the sidebar, you want to alter the width of the content material space by adding custom CSS to your WordPress theme.

To do that, go to Theme » Customize. In the left-hand menu, click on on Additional CSS.

Adding CSS with the WordPress customizer

You can now go forward and paste the following code into the little code editor:

<pre class="wp-block-syntaxhighlighter-code">
.content-area {
    width: 100%;
    margin: 0px;
    border: 0px;
    padding: 0px;
}

.content-area .website {
margin:0px;
}
</pre>

Don’t neglect to click on on the ‘Publish’ button. Now, in case you go to your website you’ll see that the content material space now takes up 100% of the accessible house.

Method 4. Removing Sidebars From Individual Pages in WordPress

You might solely need to take away the sidebar on sure pages whereas displaying the sidebar on different areas of your website. For instance, many web sites don’t present the sidebar on their sales pages, as this could distract from the web page’s name to motion.

If you simply need to take away the sidebar from a particular web page, then we suggest utilizing a web page builder plugin like SeedProd.

SeedProd permits you to design any form of web page utilizing a easy drag-and-drop editor. This makes it straightforward to add and take away the sidebar from any web page.

In the SeedProd editor, merely click on to choose the sidebar you need to take away. Then, go forward and click on on the trash can icon.

Removing a sidebar using SeedProd

If you need to take away the sidebar out of your complete website, then it’s also possible to use SeedProd to easily create a custom theme that doesn’t have any sidebars.

Method 5. Removing Sidebars from a Static 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 can 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. In the right-hand menu, choose the ‘Page’ tab and search for a ‘Template’ part.

Changing the WordPress page template

If you discover this part, then click on on it to see all the choices accessible.

You can now open the dropdown menu and search for a full-width template.

How to remove the sidebar with a full width template

If 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 following code in a clean file:

<pre class="wp-block-syntaxhighlighter-code">
<?php
/*
*
Template Name: Full-Width
*/
get_header(); ?>
</pre>

You can now save this file with the identify full-width.php.

After that, join to your website utilizing an FTP consumer or the file manager provided by your WordPress internet hosting supplier.

Then, go to /wp-content/themes/ and open the folder in your present theme. Inside this folder, discover the web page.php file and open it in any textual content editor.

The FileZilla FTP client

Now, copy the whole lot that seems after the <?php get_header(); ?> line and paste it into your full-width.php file.

Once you’ve performed that, discover and delete the line that appears like this:

<pre class="wp-block-syntaxhighlighter-code">
<?php get_sidebar(); ?>
</pre>

You can now save your modifications and add the full-width.php file to your theme folder.

You can now use this template with any web page. Simply open the ‘Template’ dropdown in the right-hand menu and choose your full-width template.

A full-width template

Note: If you’ve got a web page open in the content editor whereas creating the full-width.php file, you should have to refresh the editor for the new template to seem in the dropdown menu.

For extra particulars, see our information on how to create a full width page template in WordPress.

Method 6. Remove the Sidebar from a Single Post in WordPress

Just like pages, WordPress additionally comes with built-in help for submit templates.

If you need to take away the sidebar from sure single posts, then you may create a customized single-post template. It is analogous to making a full-width web page template.

First, you’ll want to create a brand new template file utilizing a textual content editor like Notepad. Once you’ve performed that, you may copy and paste the following code in that file:

<pre class="wp-block-syntaxhighlighter-code">
<?php
/*
 * Template Name: Featured Article
 * Template Post Type: submit, web page, product
 */

 get_header();  ?>
</pre>

This code creates a brand new template referred to as ‘Featured Article’ and makes it accessible for any web page or submit, plus any product submit sorts in your online store.

In your customized single submit template, you merely want to take away the sidebar a part of the code. For extra info, you may comply with the steps outlined in our information on how to create custom single post templates in WordPress.

When you’re performed, save this file as full-width.php.

Next, you want to add the file to your present WordPress theme folder utilizing an FTP consumer or file supervisor.

Once you’ve performed that, you may apply this template to any submit. In the right-hand menu, merely click on to broaden the ‘Templates’ part after which choose the full-width template.

How to create a full-width template in WordPress

We hope this text helped you find out how to simply take away the sidebar in your WordPress theme. You may need to see our step-by-step information on how to boost WordPress speed and performance, and our comparison of the best email marketing services to develop your visitors & gross sales.

If you preferred this text, then please subscribe to our YouTube Channel for WordPress video tutorials. You may also discover us on Twitter and Facebook.

The submit How to Remove the Sidebar in WordPress first appeared on WPBeginner.



Source link