Hello guys, I just started studying up on page templates and I’m starting to wonder about them.
Tons of people blogging on “how-to” do a page template but they are just scratching the surface.
What I want to understand is.. what are they for?
What is the difference between coding a page from scratch and doing a page template? lol
If it is just a nifty way to code a page inside wordpress and save yourself from uploading it later then I think I will pass.
Page templates ought to be coded from scratch as well. They’re templates for pages that will have other looks than your default (index) template.
So you want a certain section of your website to have a complete different layout compared to the rest of the site, you can create a separate page template to accomplish this. You’ll then assign this template to the pages you want changed and voila!
So they are mainly for changing the look of your site without having to code each individual page over again right?
So I won’t be missing out on anything if I don’t use them then.
Thanks for the reply Daan.
So they are mainly for changing the look of your site without having to code each individual page over again right.
Well no, that’s the point, when you want to change your looks you will have to change codes. It’s a way to use different templates for the same site, but on different pages.
By default, all Wordpress pages are going to use the page.php file to display the page. If you have no page templates, all pages will follow the same identical structure.
But what happens if you don’t want ALL pages on your site to look identical? Maybe you want a contact page that looks different from your standard content pages. What do you do?
Well you would create a page template with a contact form and contact information. Then when you are writing the contact page, you could then select that contact page template you created.