Add template page in WordPress

It's easy to make a new template that you can pick for certain pages on your WordPress blog.

  1. Write the code you want for your new page.  If you want to keep the same general look of the other pages and just make a small change, you can start with page.php (which should be in www/blog_name/wp-content/themes/theme_name/)
  2. at the very top of your file add <?php /* Template Name: Your New Template Name */?>
  3. Put the new file (make sure and name it something unique ex: newtemplate.php) in the same directory as you found page.php
  4. All done.  Now go into the Admin -> Pages ->Quick Edit the page and pick the new template in the Template drop down and then Update.  Easy!

Leave a Reply

Your email address will not be published.