Using Custom Templates in Wordpress

Recently, we were configuring a site with both a Blog as well as Pages with the content being managed through Wordpress. The odd thing is there didn’t seem to be clear documentation in Wordpress about how to save a template (for ex: page.php or index.php) and then hook it up simply into Wordpress to be able to tie a Page to the new template.

Then I stumbled across this post:

http://www.binarymoon.co.uk/2007/06/wordpress-tips-and-tricks-custom-templates/

Looks like it’s as easy as saving an existing template like page.php as a new template (ex: custom.php).
Then you would open custom.php and paste the following PHP tag at the top of the page:

<?php /* Template Name: Name of template here
*/ ?>

Lastly, you go into Wordpress, click Pages, select the page you want to manage and your new template should now appear as an option to choose.

  • Share/Bookmark

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

Nothing yet.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

By submitting a comment here you grant Fresh Tilled Soil a perpetual license to reproduce your words and name/web site in attribution. Inappropriate comments will be removed at admin's discretion.

Twitter Updates

Get in touch

We'd love to hear from you - let's talk about the possibilities for your project and how we can help you get the results you need.