WordPress is one of the best blogging platform. You may think why I am starting this post saying about WordPress. Recently I was busy with changing my WordPress theme. I switched to Swift theme instead of my old twenty ten WordPress theme. Swift is a very good free WordPress theme. Earlier my blog is having some custom WordPress pages, which started to display as normal pages after theme change. I solved this problem by creating a custom page template. Thanks to WordPress codex, codex did helped me well for creating a custom page within my blog in new theme.
Have a look at WordPress Deals page that I created using a custom WordPress page template. There you can see page with out sidebars and footer widgets. Are you using any WordPress theme that is not powered with a custom page template? Need to create one for your for your blog? Then here it is a solution. Goes through this simple tutorial
This tutorial will help you to remove sidebars, footer widgets from a particular page or number of pages in your blog. Creating a custom page template will help you to use WordPress as CMS and can even used for your business websites.
Step.1: Look for page.php file in your theme directory. Path for page.php in dashboard “Appearance>>Editor>>Page.php”. Either you can reach page.php file browsing though ftp account or through using your WordPress dashboard using above path. Example page
Step.2:Copy down entire page.php file to a notepad text document.
Step.3:Rename it as custompage and Change file extension to .php instead of .txt
Step.4: Change the template name as sown below
Template Name: custompage
The above code defines this custompage.php file as the “custompage” Template. You created a custom page template. Now it is time to define structure of the page.
Creating a custom WordPress Page Template With out Sidebar and Footer Widgets
I think you have already made a look at the page.php file that I mentioned. At the end of that file you can see
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Taking it of from your new custom template php code will remove sidebars and footer area. In some cases you have to remove header as well. For that you need to remove “get_header();” from custom page template.
Now you have to upload custompage.php file into your current theme directory using ftp.
Creating a new Page Using Custom template
In your WordPress dashboard “Add a new page”. And in right side “Page Attributes” you have to select custompage in templates. Add contents to your page and hit publish. Now your new blog page got a new custom page lay out.Thanks for reading this article. If you have any suggestions do mention it here.