Thesis Theme – Remove sidebar on specific posts

I hope our previous post on how to remove sidebar on specific pages was helpful for you.  If you are writing a killer post, resources post or review post, then this post will be helpful for you. See in this post, i remove the sidebar but in other post you can see the sidebar.

For writing a killer post, you spend more time to prepare the post but while publishing it in your site, it must vary from the other posts so the visitor’s attention will not divert to any other places like sidebar or header of your Thesis Theme. Your post will appear as a full-width content, removing sidebar on specific posts.

If you are using Thesis Theme, it’s very easy to achieve this in framework theme. If you want to become a Thesis Theme designer or want to customize your site yourself, then our Thesis Designer Guide will help you achieve your needs.

Let’s proceed to our Thesis Theme Tutorials. All you have to do is just to follow the simple steps:

Go to Thesis-> custom_function.php and paste the below code:

function no_sidebars() {
	global $post;
	$no_sidebars = get_post_meta($post->ID, 'no_sidebars', true);
	if (is_single() && $no_sidebars)
		return false;
		return true;
add_filter('thesis_show_sidebars', 'no_sidebars');

Go to posts-> click All posts -> choose which post you want to remove sidebar and edit the post.  Now in Custom fields section, click enter new and type No_sidebars and in Value field type as 1. See the below screenshot.

Remove sidebar thesis theme post

Now publish the post and see it in your browser. Now you can see that sidebar is removed but it still shows the white Background. To remove the sidebar completely, we are going to increase the column width. To do this, in CSS section, give a unique CSS name. See the screenshot below.

Full content post Thesis Theme

Here I am giving css name as testwp and going to use this css in custom.css

Paste the below code in Custom.css

body.testwp #content_area .page {width:85.5em;}

body.testwp #content_box #content {width:85em;float:none;}
body.testwp #content_box #content .post_box {width:80.1em;}

If you want you can give the background also in the above code. It’s really easy to customize your killer post in Thesis Theme.

P.S. Do you want to know how to customize your site easily? Grab your Thesis ebook here.

Check out our Thesis Skins

{ 4 comments… add one }

Leave a Comment

  • Steve October 22, 2011, 3:22 AM

    Hello, it looks like an easy solution to no sidebar/full width comment areas for posts. Question: Does it work for post pages that are already published? Will it change them without any problems? That is my hope … please advise. Thank you.

    • mathan October 22, 2011, 10:22 AM

      Yes, it will work for post page which it already published…. You can use the same style using the same Css.
      If you want different style on different post, then go for custom template..

  • Peter November 17, 2011, 2:06 AM

    Hi there

    Thanks for this post.

    I just need to find out that when you remove the sidebar, will the rest of the post page fill in to full width or do i still need to adjust that?


    • Fourblogger November 17, 2011, 10:14 AM

      Hi peter,
      This coding will use for unique post content, it will not affect rest of your pages.
      To make this post full width, here i call the unique CSS testwp.