Late last year i decided to start a mini forum where theme and plugin developers could submit their work if they wanted it to be featured on this blog,the idea to start came because i have been receiving quite a bunch of emails from theme designers who wanted their theme(s) to be listed here, so i started the “submit” section and it’s doing the job right now.
One thing that i did do with the “Submit” page is that i gave it a custom page, you will notice on that page that i have removed the footer and sidebar, this is not a hard thing to do, in fact you can find all the info you need at the WordPress Codex.
However to save you some time here’s a quick look at how you too can create a custom WordPress page:
1. The Page File
In you theme folder (/wp-content/themes/your-theme) you should have a file called
page.php
This is the file that is used to display your WordPress Pages, but since were looking to create a custom page we need to take some elements from the page.php file and add it into a new file.
2. Creating a new file for your custom page
Now what you need to do is create a new php file, you can do this with a text editor or if your using Cpanel just choose “create a new file” and let’s call it custom.php (you can call it anything you want) and in that file you MUST add this code at the very top:
That is basically the code to indentify your custom page, once your done with that just copy and paste all the codes from your page.php file into your custom.php file.
3. To Remove Sidebar and Footer
Removing the sidebar and footer from your custom page is as easy as identifying and removing, here’s what you need to find:
< ? php get_sidebar(); ? >
< ? php get_footer(); ? >
Once you have spotted that to line of codes all you have to do is delete it.
4. Implementing your Custom Page
What you need to do now is to implement your custom page, just go into your WordPress admin interface and select
Manage >> Pages

Choose the page you want to edit and you will see a “page template” box on the right, from the dropdown choose “custom” and save your file.
That’s it, you now have a custom page without sidebar and footer, like i said earlier this is just a quick look at the page template function, you should read the codex to get a comprehensive look at the pages template, some people would want to have their content stretch a little wider to compensate the space left by the sidebar and you can do that via your CSS file.
I’ve also created a custom.php file for download in case your too lazy to do it yourself
If you enjoyed this post, make sure you subscribe to my RSS feed!
Related posts:




January 9th, 2008 at 4:55 pm
there is no “page template” option under “write page” :S
January 9th, 2008 at 7:25 pm
@Snap - There’s always the “page template” in Write Page, what version of WordPress are you using?
January 11th, 2008 at 6:29 am
how do i take this a step deeper and instead of removing the sidebar call a custom sidebar in the custom layout? I tried creating sidebar_custom.php and stripping it of all the content i wanted out and then uploaded it to correct folder and then obviously in my custom.php calling to the new sidebar_custom.php. the error i got was:
Fatal error: Call to undefined function: get_sidebar_custom() in
February 10th, 2008 at 8:11 am
Great tip…thanks! Don’t forget after step 3 you need to upload the custom.php file to your server. Then it will appear in Wordpress. Thanks again!
July 18th, 2008 at 4:16 am
Thanks for this tip!
Was very useful for adding my spreadshirt shop to my website.
Trenchfoot
http://www.whatwouldjesusbrew.org
September 11th, 2008 at 11:53 pm
Thanks, great tip. Just what I was looking for.
http://www.FedUpWithGoogleAdWords.com
September 19th, 2008 at 10:19 am
why even after removing that famous line, the sidebar is still there ?
October 1st, 2008 at 1:25 am
hi yes i get the same error, even when i remove get_sidebar() the sidebar still appears.
October 16th, 2008 at 11:43 pm
Almost worked, but it messed up the bottom of the page footer. Maybe I need to change the code a bit.
January 28th, 2009 at 10:18 pm
Hey this could be very useful for me, thanks
One thing - I notice that on step 2 where it says “you MUST add this code at the very top:”
Below this, I noticed that the code box is empty.
April 17th, 2009 at 7:38 pm
Thanks for the tip. As you mentioned, I want to have my content on the custom pages fill the space where the sidebar was. Any tips on how to edit the css to accomplish this?
June 4th, 2009 at 5:11 pm
This one helped me a lot.. thanks ..