Title: Remove sidebar
Last modified: August 31, 2016

---

# Remove sidebar

 *  [heidger](https://wordpress.org/support/users/heidger/)
 * (@heidger)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/remove-sidebar-41/)
 * How do I remove a sidebar from just certain post types?
    I am ok with the widgets
   on the sidebar and the footer on my blog pages, but I have a post type that got
   introduced through my theme (“Albedo” from Graph Paper Press) and the plugin “
   Sell Media” by the same company. They say that this is extended customization
   beyond the normal scope of support….
 * An example page that I am trying to free from the sidebar and widgets is this
   gallery page:
    [http://www.heidgermarx.com/galleries/cars-at-night/](http://www.heidgermarx.com/galleries/cars-at-night/)
   OR: [http://www.heidgermarx.com/galleries/cars-at-night/?id=2434](http://www.heidgermarx.com/galleries/cars-at-night/?id=2434)(
   it would be great if I could have the sidebar with the widgets removed and the
   image with the “Details” and “Camera Info” extended into the area that was formerly
   used up by the sidebar, if that is possible?)
 * My homepage is: [http://www.heidgermarx.com](http://www.heidgermarx.com)
 * Thanks so much for your help and ideas in advance!!
    heidger

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

 *  Anonymous User 14733231
 * (@anonymized-14733231)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/remove-sidebar-41/#post-6962004)
 * Hello,
 * Please make one backup of your css file once. after add bellow code to hide sidebar.
 * **This will hide sidebar**
    .single-sell_media_item #secondary {display:none;}
 * **This Will make content area in full width**
    .single-sell_media_item .has-sidebar#
   content {width:100%;}
 *  Thread Starter [heidger](https://wordpress.org/support/users/heidger/)
 * (@heidger)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/remove-sidebar-41/#post-6962053)
 * Thanks so much, Neal007!! You are a genius!!
 * I used the first line `.single-sell_media_item #secondary {display:none;}`
    and
   the sidebar disappeared on the Sell Media post types!
 * But when I added the second line that you recommended `.single-sell_media_item.
   has-sidebar #content {width:100%;}` to the CSS file, nothing changed and the 
   width remained the same as with the first line of code….
 * Do you have any other ideas?
 * Thanks so much for all this already!
    heidger
 *  Anonymous User 14733231
 * (@anonymized-14733231)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/remove-sidebar-41/#post-6962059)
 * Ok will post better idea Tommorow morning on my working day.
 *  Thread Starter [heidger](https://wordpress.org/support/users/heidger/)
 * (@heidger)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/remove-sidebar-41/#post-6962060)
 * Thank you, Neal007! Looking forward to your idea tomorrow! -heidger
 *  Anonymous User 14733231
 * (@anonymized-14733231)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/remove-sidebar-41/#post-6962097)
 * Hello heidger,
 * Please try
 * **.sell-media-single-two-col.has-sidebar #content**{width:100% !important;}
 *  Thread Starter [heidger](https://wordpress.org/support/users/heidger/)
 * (@heidger)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/remove-sidebar-41/#post-6962117)
 * That worked!! Thanks so much, Neal007!
    You are a genius! heidger
 *  Anonymous User 14733231
 * (@anonymized-14733231)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/remove-sidebar-41/#post-6962118)
 * Thanks heidger,
 * Let me know if I can help you out further
 * Thanks,
    _[Skype details moderated]_
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [10 years, 4 months ago](https://wordpress.org/support/topic/remove-sidebar-41/#post-6962125)
 * @Neal007, Please don’t ask people to contact you or provide your contact information.
 *  [randomredname](https://wordpress.org/support/users/randomredname/)
 * (@randomredname)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/remove-sidebar-41/#post-6962154)
 * Hi Neal007, I’m having the same problem. I tried pasting your code but it didn’t
   work.
 * Do I paste it in style.css? I don’t see any other css file available to edit.
 * Thanks in advance!
 *  [Artur Bobinski](https://wordpress.org/support/users/kentonwebdesign/)
 * (@kentonwebdesign)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/remove-sidebar-41/#post-6962155)
 * Yuk, CSS to hide a sidebar. Not even close to correct way of doing it. To hide
   a sidebar from certain pages you would use something like this within your template
   code before the sidebar getter;
 *     ```
       <?php if ( !is_page('name of page you don't want to display on') ); ?>
               <?php get_sidebar(); ?>
       <?php endif; ?>
       ```
   
 * Or download the plugin Widget Logic and you can control what widgets are shown
   or what page with the same logic as is_page(‘name of page’)
 * That’s a much better solution then CSS doing display:none.
 *  [Artur Bobinski](https://wordpress.org/support/users/kentonwebdesign/)
 * (@kentonwebdesign)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/remove-sidebar-41/#post-6962156)
 * Here’s a reference to what I’m referring to as proper practice for this;
    [http://codex.wordpress.org/Conditional_Tags](http://codex.wordpress.org/Conditional_Tags)
 *  [randomredname](https://wordpress.org/support/users/randomredname/)
 * (@randomredname)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/remove-sidebar-41/#post-6962164)
 * Hey CureWP, thanks for your post!
 * Your code didn’t work for me exactly. I put the title of my post as suggested
   on the conditional tags link and pasted your code right before the <?php get_sidebar();?
   > command in my Single Post (single.php) file.
 * But when I went to load the page, it was just white. The entire browser page 
   was white. Couldn’t figure out why.
 * Instead, I just nixed the <?php get_sidebar(); ?> code that existed, because 
   I don’t want a sidebar on ANY of my posts. It worked.
 * But for learning purposes, can you tell me why the first way might not have worked
   for me?
 * Cheers!
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [10 years, 4 months ago](https://wordpress.org/support/topic/remove-sidebar-41/#post-6962166)
 * > But for learning purposes, can you tell me why the first way might not have
   > worked for me
 * It was superficially hidden. It was only made invisible. The sidebar was still
   there. This means that it will still be visible to search engines.
 * Note that @CureWP’s change should be implemented in a Child Theme: [https://codex.wordpress.org/Child_Themes](https://codex.wordpress.org/Child_Themes)

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

The topic ‘Remove sidebar’ is closed to new replies.

## Tags

 * [remove sidebar](https://wordpress.org/support/topic-tag/remove-sidebar/)
 * [widgets](https://wordpress.org/support/topic-tag/widgets/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 13 replies
 * 5 participants
 * Last reply from: [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/remove-sidebar-41/#post-6962166)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
