- Web Resources, Wordpress
- No Comments
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.
Nothing yet.