Loading...
WordpressWordpress SetupWordpress Themes

WordPress Thesis – Remove Sidebars From Home Page

Thesis Tutorial:  If you have the Wordpress Thesis template installed you know that the theme is extremely powerful, clean and customizable.  I’ve recently installed the Thesis theme for one of my clients and had an issue of trying to remove the sidebars from the home page.  I wanted the homepage to show one post.  I searched through all the Thesis options in the Wordpress backend but could not find an option to remove the sidebars from the homepage.    I played around with the theme and custom files and finally found the solution to remove the sidebars from the frontpage.  This change does not affect any of the other posts or pages in your blog.    See the instructions below and you will need access to your file server either via FTP, telnet or the hosting file manager.

1.  Go to your Thesis theme directory – ~/wp-content/themes/thesis18/custom/

2.  Edit the file called “custom_functions.php” and insert the following code:

// START - Thesis Theme - Remove sidebars on home page  function no_sidebars() {  	if (is_home())  		return false;  	else  		return true;  }  add_filter('thesis_show_sidebars', 'no_sidebars');    // Add a custom class to home page for styling  function home_body_class($classes) {  	if (is_home()) {  		$classes[] .= 'home';   	}  	return $classes;  }  add_filter('thesis_body_classes', 'home_body_class');    // END - Thesis Theme - Remove sidebars on home page

3. Save the file “custom_functions.php".

4.  Edit another file named “custom.css” in the same folder, and insert the following code:

/* START - Thesis theme - Remove sidebars on home page */  /* Adjust home page to accommodate removal of sidebars */  .custom.home #content { width: auto; }  .custom.home #content_box { background: none; }  /* END - Thesis theme - Remove sidebars on home page */

5.  Save the file “custom.css".

And that’s it.  Refresh your Thesis website and the sidebars are no longer visible on your front page.   If you had any problems with the above steps, or if you want to make any suggestions, feel free to leave me a comment.

Leave a Reply

Your email address will not be published. Required fields are marked *

Captcha Captcha Reload