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 .

<?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.



Tags: ,

Related posts

If you liked this post, feel free to leave a comment that is relevant to the post or subscribe to the feed and get future articles delivered to your feed reader.

Sorry but due to the spamming of a few all comments are moderated and will appear when approved and all drive-by comments will be deleted!

Comments

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.

Reply

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

Reply

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.

Reply

hmmm.. interesting niche blog.

btw. You’ve been added to the Do Follow Search Engine :) thanks for submitting

Reply

This blog is great! I even watched your videos on youtube. I’m going to refer back often and if I need any particular services I’m going to try to get them through your links. Thanks again!
PS I’ve been working on silo-ing for seo purposes and your blog is really helping. I would definitely stop by again if you did any posts on that ;)

Reply

Thank you for the instructions. I spent a lot of time trying to figure out how to remove the sidebar myself. Wordpress is the most user friendly application in that aspect.

Reply

Thank you. I trying to figure out how to remove the sidebar myself.

Reply

Hiya,
Is there a plugin which does this? or maybe someone should make one so it is easy to create a page with no side bar.

Thoughts?

Reply

Jeff  Replied:

Why ask me if a plugin exists, look at the URL is this Google?

All themes are coded so differently it would be very difficult to code a plugin that would cover every conceivable variable.

Reply

Leave a comment
Drive-By comments will be deleted! Like "Thanks for sharing", "Nice post", or any other text that doesn't contribute to the discussion. If you ask a very specific question about your particular WordPress theme's code, it will probably be deleted. I can fix your WordPress site but for a price. If you ask a question like "Why don't my blog work right", it will be deleted. If you ask a question about your WordPress site without a leaving a link to it, it will be deleted. The point is to ask questions and or comment on the the actual content of the post, and to please use some common sense. All comments are moderated. Thank you.

(required)

(required)