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 9th, 2008 at 10:02 am
Rottencrotch through her pertty pink panties are over! ,
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 2nd, 2008 at 4:17 am
Thanks, I’ve been looking for that for a long time!
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 8th, 2008 at 2:47 am
Hey Snap,
In your ‘custom.php’ file put this at the top of your code:
This will activate the page template dropdown box on your pages. If it doesn’t work try reactivating your theme. Hope this helps
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.
February 16th, 2009 at 8:53 pm
This helped me after a bit of tweaking; I had to copy the page code into the custom page downloaded from here, but otherwise, it was fabulous!
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?
May 17th, 2009 at 3:37 pm
step 2 where it says “you MUST add this code at the very top:” is empty
May 19th, 2009 at 4:59 am
Someone already said it, by maybe you missed it.
You left the template name php code blank.
Anyway, I knew how to do it, tried it, but it messes up the page. The contents of the footer apears in the sidebar!
June 4th, 2009 at 5:11 pm
This one helped me a lot.. thanks ..
June 18th, 2009 at 1:26 am
Your blog is so informative … keep up the good work!!!!
June 29th, 2009 at 3:32 pm
If you are using a custom theme, it is possible that the “Page template” selection dialog (which may differ depending on version) will not display. This is because your custom template my not have any page templates available.
If you are still having this problem, switch your theme to the default wordpress theme, and you will see your “Page Template” selection dialogue. If after switching back to your custom template this dialogue disappears, the custom template does not support “Page Template”s.
Of course this doesn’t mean you can not go in, create your own for that template.
August 4th, 2009 at 11:12 am
That information is help me so well to create custom page. thank you very much.
August 24th, 2009 at 11:41 am
why are you making someone fool……
November 3rd, 2009 at 1:28 am
Then how do you make the content wider on that page?
December 15th, 2009 at 7:51 am
Thanks for tutorial!!! Great and patience way to explain! 10x . And that file for lazy people make me to create the file
Thanks
April 5th, 2010 at 2:58 am
Then to the Supreme Court for visits with some of them . ,
April 13th, 2010 at 4:12 am
Hi,
I am new to all this, but I am having the same problem. But it appears that the box following the words “you MUST add this code at the very top:: is… empty.
To be sure, I can see the code in all other boxes. Could you help, please?
June 26th, 2010 at 4:33 pm
Thanks you so much, it helped me a lot!
July 4th, 2010 at 6:28 am
i think the missing code could be :