How to Make a Custom WordPress Page Template
In WordPress, there’s an option before you publish a page, to select a template. This option will only show if your theme has page templates. Custom page templates are great if you need a page to look different than other pages on your blog. The whole purpose of having a custom template is to possibly show a different sidebar, a full page width (no sidebar) or totally different HTML in this area. You might need to change your style sheet by adding special classes for your content or sidebars if you do this.
This is how to make a custom page template for your WordPress theme. Instead of showing bits an pieces of code that you can’t visualize together, I’m just going to show what the whole code should look like. Obviously, your code will call your style sheet classes and they will probably be called something other than “main” and “content”. Create a new PHP page and add the code below to the top of the page. You can do this in a text editor or an html editor. Right after where its says “Template Name:”, type in the name you want your template to be called. That’s the template name that will show up in the drop down box in the page you’re creating.
You can also take your index.php file and copy and paste that into a new file below the reference that goes at the top to get you started. But, doing that really wouldn’t look different than your main site. Once you have your code created (based on what I’ve shown you below) for your page template, save your page as template_name.php (don’t really use the file name I just used, come up with your own name and don’t name it page.php or you will overwrite your page file). Upload that to your theme file and when you edit or add a new page to your WP blog, your template name should now show up in the drop down menu to select from.
Sample Code for Custom Page Template
This code below gives you a general idea of what your page template should look like









hey this is a very interesting article!