By default, WordPress displays your php files by whatever the file name is. That means if you name your file wordpress.php, that is how it will show in your WordPress editor. When working with page templates, or if you just want to keep your files a little more organized, you’ll probably want to give your templates names.

Here is all you need to do. Paste the following code at the top of the file:

<?php
/*
Template Name: WordPress PHP
*/
?>

Now change WordPress PHP to be the name you want to use. Easy enough, right?  Tomorrow I’ll be posting a little more about page templates!

Want automatic updates? Subscribe to our RSS feed or
Get Email Updates sent directly to your inbox!
Tweet This | Digg This | Stumble it | Add to Del.icio.us | | Print This

Kyle Eslick

Kyle Eslick is the founder and primary author of WordPress Hacks. You can learn more about him at KyleEslick.com or you can follow his personal tweets here.

Be The First to Comment! »

Trackbacks/Pingbacks »

Leave a Reply