Enk. had recently covered steps to Create Custom Sidebar in Wordpress Blog. For some of the pages in a wordpress blog, I wanted to remove the sidebar altogether and have more space specifically for those pages. I will share the steps I followed.
What are We doing?
Probably ended up writing tons of Pages on my Blog. At the end, I just remembered I don’t want a sidebar for one of my Pages. Just an specific one. Let me start by finding the accurate Page Title or Page ID I’m looking for.
Finding Name of your Page:
First thing that you would want to do is to find name of your pages where you do not want sidebar. Click on Pages section in Wordpress Admin and you should be in yourblogname/wp-admin/edit-pages.php. You can find name/title of your pages here. Please note that if you don’t have all-in-one-seo or other plug-ins that could modify titles you could simply visit the page to get the title.
Editing Page.php:
You can now simply change the file page.php from your theme to include sidebar conditionally.
<?php if (!is_page(‘Page Title’)) : ?>
<?php get_sidebar(); ?>
<?php endif; ?>
Please note that I have taken Page Title as an example and you need to replace this with your own title. Alternatively you could use page id in this condition. You might have to include different div classes for title and page content so that you can increase width of content area using the same condition.
Example:
You can see a working example on my Dofollow Blogs Search Engine where I wanted more space.
Author Bio:
Jeet is a wordpress enthusiast and likes to do small hacks to his blogs and directories. He also owns and maintains a Free Directory List.




0 Comments For This Post
1 Trackbacks For This Post
April 20th, 2009 at 11:26 pm
[...] [...]