Title: Removing right sidebar
Last modified: August 19, 2016

---

# Removing right sidebar

 *  [domsdey](https://wordpress.org/support/users/domsdey/)
 * (@domsdey)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/removing-right-sidebar/)
 * How can I remove the right sidebar(it has a left too) from a theme?
    That’s the
   [theme](http://amazingwordpressthemes.com/wordpress-themes/books-and-imagination-10/).

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Thread Starter [domsdey](https://wordpress.org/support/users/domsdey/)
 * (@domsdey)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/removing-right-sidebar/#post-995185)
 * Can’t anyone help?
 *  [stvwlf](https://wordpress.org/support/users/stvwlf/)
 * (@stvwlf)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/removing-right-sidebar/#post-995189)
 * When the right sidebar is removed, what should happen with the empty space that
   will be left?
 *  Thread Starter [domsdey](https://wordpress.org/support/users/domsdey/)
 * (@domsdey)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/removing-right-sidebar/#post-995191)
 * Uhm… THe field for posts should be larger?
 *  [stvwlf](https://wordpress.org/support/users/stvwlf/)
 * (@stvwlf)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/removing-right-sidebar/#post-995198)
 * It would be presumptuous for me to assume that is what you wanted, although obviously
   its the most likely choice.
 * You have some widgets installed in the right column. First you want to remove
   them. In Admin, Settings/Appearance/Widgets
 * Then there is some code that needs to be commented out or deleted (your choice).
   It is PHP code so I can’t tell you exactly what it will look like as all I can
   see is the HTML after the PHP has been processed.
 * Most likely it is in sidebar.php although some themes have a left sidebar file
   and a right sidebar file. If you have a right sidebar file, it can be easy. Find
   the place that includes the right sidebar file, most likely index.php – make 
   a backup copy of it. Then delete the line that is including the right sidebar
   file.
 * If both of your sidebars are defined in sidebar.php then you need to remove the
   code that displays the right sidebar. Again, make a backup file.
    It starts with
   <div class=”dynamic_widget”>
 * You will find that twice – once for each sidebar – make sure you remove the right
   one.
 * After that is gone and you are seeing the site without the right sidebar, find
   this in file style.css on line 260
 * #content-main {
    float:left; width:547px; }
 * change 547 to 747 and save. Should do it.
 *  Thread Starter [domsdey](https://wordpress.org/support/users/domsdey/)
 * (@domsdey)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/removing-right-sidebar/#post-995201)
 * Damn shit fuck.
    Both sidebars are in one file, sidebar.php I found that in it:`
   <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(1) ) : ?>`
   So I changed it to: `<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(
   1) ) : ?>` but no effect. that’s functions.php:
 *     ```
       <?php
   
       if ( function_exists('register_sidebar') )
   
           register_sidebar(array(
   
           	'name' => 'Sidebar Left',
   
               'before_widget' => '',
   
               'after_widget' => '',
   
               'before_title' => '<h3>',
   
               'after_title' => '</h3>',
   
           ));
   
           register_sidebar(array(
   
           	'name' => 'Sidebar Right',
   
               'before_widget' => '',
   
               'after_widget' => '',
   
               'before_title' => '<h3>',
   
               'after_title' => '</h3>',
   
           ));
   
       ?>
       ```
   
 * I modified it to:
 *     ```
       <?php
   
       if ( function_exists('register_sidebar') )
   
           register_sidebar(array(
   
           	'name' => 'Sidebar Left',
   
               'before_widget' => '',
   
               'after_widget' => '',
   
               'before_title' => '<h3>',
   
               'after_title' => '</h3>',
   
           ));
   
       ?>
       ```
   
 * But still no effect…
    Any other ideas?
 *  [stvwlf](https://wordpress.org/support/users/stvwlf/)
 * (@stvwlf)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/removing-right-sidebar/#post-995259)
 * Hi
 * That code in functions.php is to initiate the widget-ready sidebars.
 * Above you said:
 * > I found that in it:
   >  <?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(
   > 1) ) : ?> So I changed it to: <?php if ( !function_exists(‘dynamic_sidebar’)
   > || !dynamic_sidebar(1) ) : ?>
 * Both lines look the same to me, before and after
 * You know in the widgits manager, where you specify which sidebar you want to 
   assign widgits to? That is where the sidebar #1 and #2 come into play. They are
   initiated in functions.php. you only want to initiate 1 sidebar
 *  Thread Starter [domsdey](https://wordpress.org/support/users/domsdey/)
 * (@domsdey)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/removing-right-sidebar/#post-995269)
 * Hi
    I wanted to say I modified `<?php if ( !function_exists('dynamic_sidebar')
   || !dynamic_sidebar(1) ) : ?>` to `<?php if ( !function_exists('dynamic_sidebar')
   || !dynamic_sidebar(0) ) : ?>` So what should I do?

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Removing right sidebar’ is closed to new replies.

 * 7 replies
 * 2 participants
 * Last reply from: [domsdey](https://wordpress.org/support/users/domsdey/)
 * Last activity: [17 years, 2 months ago](https://wordpress.org/support/topic/removing-right-sidebar/#post-995269)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
