Easy Guide To Making Template Pages in WordPress
Sometimes, when building your site in WordPress, the page just will not do what you want it to and so you need to add an HTML or PHP page but, you still want it to look a part of your site.
I am not going to go into the whys and wherefores of the coding as most people who ask me how to do things are not interested. They just want to know how to do it in an easy and concise way.
So here is a basic template page code which you use and upload.
Anything in red is what YOU change. Anything else should be left alone
———————————————–
Open a blank New notepad page or use a PHP editor
copy this then change the RED to what you want
—————————————————————————————————
[message_box type="note"]<?php
/*
Template Name: TITLE OF YOUR TEMPLATE
*/
?>
<?php get_header(); ?>
PLACE YOUR BODY HERE. ANY CONTENT YOU WANT ON THIS PAGE
<?php get_footer(); ?>[/message_box]
—————————————————————–
Change TITLE OF YOUR TEMPLATE to the title of the page you will want. For instance, if making a page for an Amazon shop, call it Amazon so you can find it easily when uploaded.
Where it says PLACE YOUR BODY HERE. ANY CONTENT YOU WANT ON THIS PAGE, this is where any code you are putyting on that page which you want to show, goes. For instance, if adding an Amazon shop, or iframe for another site or page, this is where that would go.
Save the page as TitleOfYourTemplate.php Notice it MUST be saved as PHP not HTML as you are calling PHP on that page.
—————————————————————–
Upload the page to your theme folder. So it would be public_html/wp_content/YourThemeYouAreUsing/Template.php
—————————————————————–
Make a new page
On the right you will now see a Template section
Choose your page and save
View
HERE IS AN EXAMPLE FOR YOU TO DOWNLOAD
RIGHT CLICK ON THE DOWNLOAD TITLE AND SAVE LINK AS – REMEMBER TO OPEN IN NOTEPAD OR PHP EDITOR
|
|
download: WordPress Template Page example (349B) added: 11/08/2012 clicks: 44 description: Right click and save to your computer. Open in notepad or a PHP editor to edit. |
Or here is a TEXT FILE. Please make sure to save as PHP when you have completed editing this
|
|
download: Template Example TEXTFILE (375B) added: 12/08/2012 clicks: 60 description: If using this one, make sure you save the completed file as a PHP file NOT a text |
© 2012, 1stAngel. All rights reserved.

















