No Sidebar On WordPress Pages
There may be times you want to create a page, not a post, on your blog but not show the sidebar on it. This is a pretty easy thing to do if you are not afraid to hack around in the themes files. Here is a WordPress Guide to show you how to remove the sidebar from a page template.
To start you need to create a custom page template and I have already posted instructions about that here: How To Create A Custom WordPress Page Template.
After you make the custom page template all you need to do is delete the sidebar from it by removing the following code. This code is usually at the bottom of the file, but it may be elsewhere depending on your WordPress theme.
<?php get_sidebar(); ?>
And yes there is a way to create a different sidebar to show on a custom page if you want to do that but that post is for another day.
WordPress Guide WordPress themeIf you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
Tagged with WordPress Guide, WordPress theme
Related Posts
4 Responses to “No Sidebar On WordPress Pages”
Discussion Area - Leave a Comment
If you have a question about your blog please leave a link to it. Please don't ask questions like "Why don't my blog work right?" and expect an answer.Two links or less are welcome, any more and your comment will be spammed! Nofollow has been disabled, all comments are moderated and will not appear until approved. Please submit only once.
XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
Or just copy the example below and change your details.
Example - <a href="http://www.YourSite.com">Title Of Site</a>










I was using the default theme in wordpress and in order to get the sidebar to show on all the permalinks i had to change it from widecolumn to narrowcolumn and then add the sidebar php function.
Hi,
I want to use page.php as the home page with no sidebar
I removed the sidebar but now the page is messed up.
http://www.surfearnguide.com/?page_id=5
How do I assign the style sheet to this page?
I guess I have to play with the margins to allow the text to fill the whole page …correct?
BTW Your “create a new template” tutorials (and video) were a life saver..so easy to understand and follow.
Thank you
Herman there are too many variables and theme specific things for me to answer that question for you.
Parts of the page and or margins could be set relative to the sidebar for example.
hmmm.. interesting niche blog.
btw. You’ve been added to the Do Follow Search Engine
thanks for submitting